Explicitly manage license file to avoid snapcraft 3 deprecation
Placing `license.txt` in the `snap` folder was always a rather flaky way
to get it in the package, and snapcraft 3 does not like arbitrary files
being placed here. This patch therefore creates a new part which places
the license file in the `$SNAP/doc` directory of the generated package.
This is a small tweak that avoids us having to explicitly invoke the
full path to snapcraft, and may help in future if we need or want to
install other snap packages to help the build.
This patch adds Mips and MSP430 regular LLVM targets together with the
RISCV and WebAssembly experimental targets, matching what is done with
the upstream LDC binary packages.
The targets have also been alphabetized for easy discovery.
This patch takes advantage of snapcraft's support for tab completion via
the app `completer:` field. Unfortunately bash-completion settings are
not currently available for the other apps, so cannot be included.
The python components in the setup are only required to run lit-tests.
Since these are currently disabled, we can just remove them for now and
restore them should we ever want to re-enable those test cases.
Technically we could bundle the remaining `build-packages` into the ldc
part, but keeping the ctest-setup part in place draws a nice clean line
between packages required to build LDC itself, and packages only needed
by the tests.
Since snapd is available in the Azure Ubuntu 16.04 image, we might as
well keep it simple, install snapcraft as a snap package and run it.
This should pretty much match what happens on Launchpad, apart from the
lack of LXD container.
Given the build times experienced in Launchpad, the timeout has been set
to 0, meaning it will always be the maximum allowed by Azure Pipelines
(currently 360 minutes).