Skip to content

Commit

Permalink
Merge pull request #45 from owl4ce/patch-1
Browse files Browse the repository at this point in the history
cgnutools: Optimize clang build step, time, and size for future changes
  • Loading branch information
dslm4515 authored Sep 14, 2021
2 parents b8a6478 + 9b7b696 commit 1b8e2d7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 23 deletions.
1 change: 1 addition & 0 deletions 1-cgnutools/2-binutils
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mkdir -v build && cd build
--with-sysroot=/cgnutools/${CMLFS_TARGET} \
--disable-nls \
--disable-multilib \
--disable-static \
--disable-werror \
--enable-deterministic-archives \
--disable-compressed-debug-sections
Expand Down
1 change: 1 addition & 0 deletions 1-cgnutools/5-GCC-final
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ AR=ar LDFLAGS="-Wl,-rpath,/cgnutools/lib" \
--host=${CMLFS_HOST} \
--target=${CMLFS_TARGET} \
--disable-multilib \
--disable-static \
--with-sysroot=/cgnutools \
--disable-nls \
--enable-shared \
Expand Down
18 changes: 0 additions & 18 deletions 1-cgnutools/7-libexecinfo

This file was deleted.

File renamed without changes.
16 changes: 11 additions & 5 deletions 1-cgnutools/8-clang
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,14 @@ export CONFIG_CLANG+="-DCLANG_DEFAULT_RTLIB=compiler-rt "
export CONFIG_CLANG+="-DCLANG_ENABLE_STATIC_ANALYZER=OFF "
export CONFIG_CLANG+="-DCLANG_ENABLE_ARCMT=OFF "

# Set the flags to prevent build static libraries for
# libunwind, libcxxabi, and libcxx:
export CONFIG_LIBUNWIND="-DLIBUNWIND_ENABLE_STATIC=OFF "
export CONFIG_LIBCXXABI="-DLIBCXXABI_ENABLE_STATIC=OFF "
export CONFIG_LIBCXX="-DLIBCXX_ENABLE_STATIC=OFF "

# Set paths...
export CONFIG_PATHS="-DBacktrace_HEADER=/cgnutools/include/execinfo.h "
export CONFIG_PATHS+="-DBacktrace_LIBRARY=/cgnutools/lib/libexecinfo.so.1 "
export CONFIG_PATHS+="-DICONV_LIBRARY_PATH=/cgnutools/lib/libc.so "
export CONFIG_PATHS="-DICONV_LIBRARY_PATH=/cgnutools/lib/libc.so "

# Turn off unwanted features, docs and tests
export BUILD_OFF="-DLLVM_BUILD_TESTS=OFF "
Expand All @@ -128,14 +132,16 @@ export BUILD_OFF+="-DLLVM_ENABLE_LIBXML2=OFF "
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/cgnutools" \
-DBUILD_SHARED_LIBS=ON \
-DLLVM_ENABLE_LIBCXX=ON \
-DLLVM_TARGET_ARCH="X86" \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DLIBCXX_HAS_MUSL_LIBC=ON \
-DDEFAULT_SYSROOT="/cgnutools" \
${CONFIG_TOOLS} ${CONFIG_TRUPLES} \
${CONFIG_CRT} ${CONFIG_CLANG} \
${CONFIG_PATHS} ${BUILD_OFF}
${CONFIG_CRT} ${CONFIG_CLANG} \
${CONFIG_LIBUNWIND} ${CONFIG_LIBCXXABI} \
${CONFIG_LIBCXX} ${CONFIG_PATHS} ${BUILD_OFF}

# Now ready to build
make -C build && \
Expand Down

0 comments on commit 1b8e2d7

Please sign in to comment.