Skip to content

Commit

Permalink
chore: add flags for Link-Time Optimization
Browse files Browse the repository at this point in the history
libcxx builds from upstream are built with LTO, avoiding these
flags will cause miscompiles
  • Loading branch information
deepak1556 committed Aug 5, 2021
1 parent ee4aaaa commit db779b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/azure-pipelines/linux/product-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ steps:
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-nostdinc++ -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -L$PWD/.build/libcxx-objects -lc++abi"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi"
fi
if [ "$VSCODE_ARCH" == "x64" ]; then
Expand Down

0 comments on commit db779b1

Please sign in to comment.