Skip to content

Commit b4e8d44

Browse files
committed
unix: build all targets for clang
This will hopefully enable more experimentation with cross compiling. This does increase the size of the clang tarball by ~100 MB and adds several more minutes of CPU time to the build. But I think that's worth it for enabling experimentation.
1 parent 43c1b04 commit b4e8d44

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cpython-unix/build-clang-linux64.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ popd
149149
find /tools/clang-stage2 | sort
150150

151151
# Stage 3: Build with Clang built Clang.
152+
#
153+
# We remove LLVM_TARGETS_TO_BUILD from this configuration, enabling
154+
# support for all targets. The stage 1 and 2 builds don't benefit from
155+
# non-native target support, which is why we exclude host target support
156+
# above.
152157
mkdir stage3
153158
pushd stage3
154159
cmake \
@@ -162,7 +167,6 @@ cmake \
162167
-DCMAKE_CXX_FLAGS="-fPIC -Qunused-arguments -L/tools/clang-stage2/lib" \
163168
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-Bsymbolic-functions -L/tools/clang-stage2/lib" \
164169
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-Bsymbolic-functions -L/tools/clang-stage2/lib" \
165-
-DLLVM_TARGETS_TO_BUILD=X86 \
166170
-DLLVM_TOOL_LIBCXX_BUILD=ON \
167171
-DLIBCXX_LIBCPPABI_VERSION="" \
168172
-DLLVM_BINUTILS_INCDIR=/tools/host/include \

0 commit comments

Comments
 (0)