diff options
author | Diana Picus <diana.picus@linaro.org> | 2018-02-23 13:18:37 +0100 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2018-02-23 13:18:37 +0100 |
commit | bb6a76e69510927a2949a97300237e263c6908b5 (patch) | |
tree | f5685bd1b2eb3c3125609a8b7d2b4f55f6775c73 /scripts | |
parent | c1b4d34db47d9c1c14b9a6807afe37f957f52fd3 (diff) | |
download | linaro-scripts-python.tar.gz |
Require clang in stage 1 when enabling stage 2 / test-suitepython
Both the test-suite and stage 2 need clang, so check early that it is
built as part of stage 1.
I'm not 100% certain on the former, since nowadays the test-suite
contains some bitcode tests which might be able to run without clang,
but it's unlikely that we'll ever be interested in such a scenario.
Change-Id: I6668557d9c2ef8cbad8a309a3c73c690d24533d1
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/llvm.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/llvm.py b/scripts/llvm.py index 1962293..70ba713 100644 --- a/scripts/llvm.py +++ b/scripts/llvm.py @@ -208,6 +208,15 @@ def build_and_test(args): sandboxDir = args.sandbox testSuiteFlags = args.testSuiteFlags + if not "clang" in stage1Subprojs: + if enableTestSuite: + die("Can't enable the test-suite if stage 1 doesn't build clang." + "Please add clang to the subprojects to be built for stage 1.") + + if stage2BuildDir: + die("Can't enable stage 2 if stage 1 doesn't build clang." + "Please add clang to the subprojects to be built for stage 1.") + if dryRun: consumer = CommandPrinter() else: @@ -246,8 +255,6 @@ def build_and_test(args): buildConfig2 = LLVMBuildConfig(sourceConfig, stage2BuildDir, consumer) - # TODO: Make sure clang is actually built in this config (preferably - # before reaching this point) buildConfig2.cmake( stage2Defs + [ "-DCMAKE_C_COMPILER={}/bin/clang".format(stage1BuildDir), @@ -262,8 +269,6 @@ def build_and_test(args): setup_test_suite(consumer, sandboxDir, lntDir) - # TODO: Make sure clang is actually built in this config (preferably - # before reaching this point) lit = os.path.join(testedBuildDir, "bin", "llvm-lit") clang = os.path.join(testedBuildDir, "bin", "clang") run_test_suite(consumer, sandboxDir, testSuiteDir, lit, |