@@ -22,6 +22,8 @@ ${PROGNAME} [options] <BUILDER>
22
22
23
23
[-h|--help] Display this help and exit.
24
24
25
+ [-v|--verbose] Enable verbose output.
26
+
25
27
--llvm-root <DIR> Path to the root of the LLVM monorepo. By default, we try
26
28
to figure it out based on the current working directory.
27
29
@@ -48,12 +50,18 @@ if [[ $# == 0 ]]; then
48
50
exit 0
49
51
fi
50
52
53
+ VERBOSE_FLAG=' '
54
+
51
55
while [[ $# -gt 0 ]]; do
52
56
case ${1} in
53
57
-h|--help)
54
58
usage
55
59
exit 0
56
60
;;
61
+ -v|--verbose)
62
+ VERBOSE_FLAG=' -v'
63
+ shift
64
+ ;;
57
65
--llvm-root)
58
66
MONOREPO_ROOT=" ${2} "
59
67
shift ; shift
@@ -168,25 +176,25 @@ function generate-cmake-android() {
168
176
169
177
function check-runtimes() {
170
178
step " Building libc++ test dependencies"
171
- ${NINJA} -vC " ${BUILD_DIR} " cxx-test-depends
179
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " cxx-test-depends
172
180
173
181
step " Running the libc++ tests"
174
- ${NINJA} -vC " ${BUILD_DIR} " check-cxx
182
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxx
175
183
176
184
step " Running the libc++abi tests"
177
- ${NINJA} -vC " ${BUILD_DIR} " check-cxxabi
185
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxxabi
178
186
179
187
step " Running the libunwind tests"
180
- ${NINJA} -vC " ${BUILD_DIR} " check-unwind
188
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-unwind
181
189
}
182
190
183
191
# TODO: The goal is to test this against all configurations. We should also move
184
192
# this to the Lit test suite instead of being a separate CMake target.
185
193
function check-abi-list() {
186
194
step " Running the libc++ ABI list test"
187
- ${NINJA} -vC " ${BUILD_DIR} " check-cxx-abilist || (
195
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxx-abilist || (
188
196
error " Generating the libc++ ABI list after failed check"
189
- ${NINJA} -vC " ${BUILD_DIR} " generate-cxx-abilist
197
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " generate-cxx-abilist
190
198
false
191
199
)
192
200
}
@@ -233,7 +241,7 @@ function test-armv7m-picolibc() {
233
241
" ${@ } "
234
242
235
243
step " Installing compiler-rt"
236
- ${NINJA} -vC " ${BUILD_DIR} /compiler-rt" install
244
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} /compiler-rt" install
237
245
# Move compiler-rt libs into the same directory as all the picolib objects.
238
246
mv " ${INSTALL_DIR} /lib/armv7m-unknown-none-eabi" /* " ${INSTALL_DIR} /lib"
239
247
@@ -256,7 +264,7 @@ check-generated-output)
256
264
# Reject patches that forgot to re-run the generator scripts.
257
265
step " Making sure the generator scripts were run"
258
266
set +x # Printing all the commands below just creates extremely confusing output
259
- ${NINJA} -vC " ${BUILD_DIR} " libcxx-generate-files
267
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " libcxx-generate-files
260
268
git diff | tee ${BUILD_DIR} /generated_output.patch
261
269
git ls-files -o --exclude-standard | tee ${BUILD_DIR} /generated_output.status
262
270
! grep -q ' ^--- a' ${BUILD_DIR} /generated_output.patch || false
@@ -400,13 +408,13 @@ bootstrapping-build)
400
408
-DLLVM_LIT_ARGS=" -sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
401
409
402
410
step " Running the libc++ and libc++abi tests"
403
- ${NINJA} -vC " ${BUILD_DIR} " check-runtimes
411
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-runtimes
404
412
405
413
step " Installing libc++ and libc++abi to a fake location"
406
- ${NINJA} -vC " ${BUILD_DIR} " install-runtimes
414
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " install-runtimes
407
415
408
416
step " Running the LLDB libc++ data formatter tests"
409
- ${NINJA} -vC " ${BUILD_DIR} " lldb-api-test-deps
417
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " lldb-api-test-deps
410
418
${BUILD_DIR} /bin/llvm-lit -sv --param dotest-args=' --category libc++' " ${MONOREPO_ROOT} /lldb/test/API"
411
419
412
420
ccache -s
@@ -552,7 +560,7 @@ apple-configuration)
552
560
553
561
step " Running tests against Apple-configured libc++"
554
562
# TODO: It would be better to run the tests against the fake-installed version of libc++ instead
555
- xcrun --sdk macosx ninja -vC " ${BUILD_DIR} /${arch} " check-cxx check-cxxabi check-cxx-abilist
563
+ xcrun --sdk macosx ninja ${VERBOSE_FLAG} -C " ${BUILD_DIR} /${arch} " check-cxx check-cxxabi check-cxx-abilist
556
564
;;
557
565
apple-system|apple-system-hardened)
558
566
clean
@@ -595,13 +603,13 @@ apple-system|apple-system-hardened)
595
603
-DCMAKE_INSTALL_NAME_DIR=" /usr/lib/system"
596
604
597
605
step " Running the libc++ tests"
598
- ${NINJA} -vC " ${BUILD_DIR} /cxx" check-cxx
606
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} /cxx" check-cxx
599
607
600
608
step " Running the libc++abi tests"
601
- ${NINJA} -vC " ${BUILD_DIR} /cxx" check-cxxabi
609
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} /cxx" check-cxxabi
602
610
603
611
step " Running the libunwind tests"
604
- ${NINJA} -vC " ${BUILD_DIR} /unwind" check-unwind
612
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} /unwind" check-unwind
605
613
;;
606
614
aarch64)
607
615
clean
@@ -659,13 +667,13 @@ clang-cl-dll)
659
667
# setting when cmake and the test driver does the right thing automatically.
660
668
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS=" enable_experimental=False"
661
669
step " Running the libc++ tests"
662
- ${NINJA} -vC " ${BUILD_DIR} " check-cxx
670
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxx
663
671
;;
664
672
clang-cl-static)
665
673
clean
666
674
generate-cmake-libcxx-win -DLIBCXX_ENABLE_SHARED=OFF
667
675
step " Running the libc++ tests"
668
- ${NINJA} -vC " ${BUILD_DIR} " check-cxx
676
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxx
669
677
;;
670
678
clang-cl-no-vcruntime)
671
679
clean
@@ -676,14 +684,14 @@ clang-cl-no-vcruntime)
676
684
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS=" enable_experimental=False" \
677
685
-DLIBCXX_TEST_CONFIG=" llvm-libc++-shared-no-vcruntime-clangcl.cfg.in"
678
686
step " Running the libc++ tests"
679
- ${NINJA} -vC " ${BUILD_DIR} " check-cxx
687
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxx
680
688
;;
681
689
clang-cl-debug)
682
690
clean
683
691
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS=" enable_experimental=False" \
684
692
-DCMAKE_BUILD_TYPE=Debug
685
693
step " Running the libc++ tests"
686
- ${NINJA} -vC " ${BUILD_DIR} " check-cxx
694
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxx
687
695
;;
688
696
clang-cl-static-crt)
689
697
clean
@@ -692,7 +700,7 @@ clang-cl-static-crt)
692
700
generate-cmake-libcxx-win -DLIBCXX_ENABLE_SHARED=OFF \
693
701
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
694
702
step " Running the libc++ tests"
695
- ${NINJA} -vC " ${BUILD_DIR} " check-cxx
703
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxx
696
704
;;
697
705
mingw-dll)
698
706
clean
@@ -738,7 +746,7 @@ mingw-incomplete-sysroot)
738
746
# Only test that building succeeds; there's not much extra value in running
739
747
# the tests here, as it would be equivalent to the mingw-dll config above.
740
748
step " Building the runtimes"
741
- ${NINJA} -vC " ${BUILD_DIR} "
749
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} "
742
750
;;
743
751
aix)
744
752
clean
@@ -775,7 +783,7 @@ android-ndk-*)
775
783
-DLIBCXX_TEST_PARAMS=" ${PARAMS} " \
776
784
-DLIBCXXABI_TEST_PARAMS=" ${PARAMS} "
777
785
check-abi-list
778
- ${NINJA} -vC " ${BUILD_DIR} " install-cxx install-cxxabi
786
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " install-cxx install-cxxabi
779
787
780
788
# Start the emulator and make sure we can connect to the adb server running
781
789
# inside of it.
@@ -788,9 +796,9 @@ android-ndk-*)
788
796
adb shell mkdir -p /data/local/tmp/adb_run
789
797
adb push " ${BUILD_DIR} /lib/libc++_shared.so" /data/local/tmp/libc++/libc++_shared.so
790
798
step " Running the libc++ tests"
791
- ${NINJA} -vC " ${BUILD_DIR} " check-cxx
799
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxx
792
800
step " Running the libc++abi tests"
793
- ${NINJA} -vC " ${BUILD_DIR} " check-cxxabi
801
+ ${NINJA} ${VERBOSE_FLAG} -C " ${BUILD_DIR} " check-cxxabi
794
802
;;
795
803
# ################################################################
796
804
# Insert vendor-specific internal configurations below.
0 commit comments