Skip to content

Commit 240a7dd

Browse files
committed
Build GCC with support for BOLT
1 parent be581d9 commit 240a7dd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ci/docker/host-x86_64/dist-x86_64-linux/build-gcc.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@ sed -i'' 's|ftp://gcc\.gnu\.org/|https://gcc.gnu.org/|g' ./contrib/download_prer
2727
./contrib/download_prerequisites
2828
mkdir ../gcc-build
2929
cd ../gcc-build
30+
31+
# '-fno-reorder-blocks-and-partition' is required to
32+
# enable BOLT optimization of the C++ standard library,
33+
# which is included in librustc_driver.so
3034
hide_output ../gcc-$GCC/configure \
3135
--prefix=/rustroot \
3236
--enable-languages=c,c++ \
33-
--disable-gnu-unique-object
37+
--disable-gnu-unique-object \
38+
--enable-cxx-flags='-fno-reorder-blocks-and-partition'
3439
hide_output make -j$(nproc)
3540
hide_output make install
3641
ln -s gcc /rustroot/bin/cc

0 commit comments

Comments
 (0)