Skip to content

Commit fbbcaa5

Browse files
committed
llvm-mingw: Enable tests and improve debugging.
1 parent 26cc342 commit fbbcaa5

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
diff --git a/build-compiler-rt.sh b/build-compiler-rt.sh
2+
index f80272c..d775bb0 100755
3+
--- a/build-compiler-rt.sh
4+
+++ b/build-compiler-rt.sh
5+
@@ -27,7 +27,7 @@ while [ $# -gt 0 ]; do
6+
SRC_DIR=..
7+
BUILD_SUFFIX=-sanitizers
8+
SANITIZERS=1
9+
- BUILD_BUILTINS=FALSE
10+
+ BUILD_BUILTINS=TRUE
11+
# Override the default cfguard options here; this unfortunately
12+
# also overrides the user option if --enable-cfguard is passed
13+
# before --build-sanitizers (although that combination isn't
14+
@@ -99,7 +99,7 @@ for arch in $ARCHS; do
15+
[ -n "$NO_RECONF" ] || rm -rf CMake*
16+
cmake \
17+
${CMAKE_GENERATOR+-G} "$CMAKE_GENERATOR" \
18+
- -DCMAKE_BUILD_TYPE=Release \
19+
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
20+
-DCMAKE_INSTALL_PREFIX="$CLANG_RESOURCE_DIR" \
21+
-DCMAKE_C_COMPILER=$arch-w64-mingw32-clang \
22+
-DCMAKE_CXX_COMPILER=$arch-w64-mingw32-clang++ \
23+
@@ -118,8 +118,12 @@ for arch in $ARCHS; do
24+
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
25+
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \
26+
-DSANITIZER_CXX_ABI=libc++ \
27+
- -DCMAKE_C_FLAGS_INIT="$CFGUARD_CFLAGS" \
28+
- -DCMAKE_CXX_FLAGS_INIT="$CFGUARD_CFLAGS" \
29+
+ -DCMAKE_C_FLAGS_INIT="-ggdb3 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer $CFGUARD_CFLAGS" \
30+
+ -DCMAKE_CXX_FLAGS_INIT="-ggdb3 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer $CFGUARD_CFLAGS" \
31+
+ -DCOMPILER_RT_INCLUDE_TESTS=ON \
32+
+ -DCOMPILER_RT_TEST_COMPILER=$arch-w64-mingw32-clang \
33+
+ -DCOMPILER_RT_TEST_COMPILER_CFLAGS="" \
34+
+ -DCOMPILER_RT_EMULATOR="true" \
35+
$SRC_DIR
36+
cmake --build . ${CORES:+-j${CORES}}
37+
cmake --install . --prefix "$INSTALL_PREFIX"

0 commit comments

Comments
 (0)