File tree Expand file tree Collapse file tree 4 files changed +3
-43
lines changed Expand file tree Collapse file tree 4 files changed +3
-43
lines changed Original file line number Diff line number Diff line change @@ -72,15 +72,10 @@ jobs:
7272 git config --global user.name "User"
7373 ./y.sh prepare
7474
75- - name : Add more failing tests because of undefined symbol errors (FIXME)
76- run : cat tests/failing-lto-tests.txt >> tests/failing-ui-tests.txt
77-
7875 - name : Run tests
7976 run : |
8077 # FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros.
81- # FIXME(antoyo): this should probably not be needed since we embed the LTO bitcode.
82- printf '[profile.release]\nlto = "fat"\n' >> build/build_sysroot/sysroot_src/library/Cargo.toml
83- ./y.sh test --release --clean --release-sysroot --build-sysroot --keep-lto-tests ${{ matrix.commands }}
78+ CG_RUSTFLAGS="-Cembed-bitcode=yes" ./y.sh test --release --clean --release-sysroot --build-sysroot --keep-lto-tests ${{ matrix.commands }}
8479
8580 - name : LTO test
8681 run : |
9994 ar rcs libadd.a add.o
10095 popd
10196
102- EMBED_LTO_BITCODE=1 CHANNEL="release" CG_RUSTFLAGS="-L native=. -Clinker-plugin-lto -Clinker=gcc" ./y.sh cargo build --release --manifest-path tests/cross_lang_lto/Cargo.toml
97+ CHANNEL="release" CG_RUSTFLAGS="-L native=. -Clinker-plugin-lto -Clinker=gcc" ./y.sh cargo build --release --manifest-path tests/cross_lang_lto/Cargo.toml
10398 call_found=$(objdump -dj .text tests/cross_lang_lto/target/release/cross_lang_lto | grep -c "call .*my_add" ) ||:
10499 if [ $call_found -gt 0 ]; then
105100 echo "ERROR: call my_add found in asm"
Original file line number Diff line number Diff line change @@ -59,8 +59,6 @@ pub(crate) fn codegen(
5959 if lto_supported {
6060 context. add_command_line_option ( "-flto=auto" ) ;
6161 context. add_command_line_option ( "-flto-partition=one" ) ;
62- // TODO(antoyo): remove since we don't want fat objects when it is for Bitcode only.
63- context. add_command_line_option ( "-ffat-lto-objects" ) ;
6462 }
6563 context
6664 . compile_to_file ( OutputKind :: ObjectFile , bc_out. to_str ( ) . expect ( "path to str" ) ) ;
Original file line number Diff line number Diff line change 44 * ar rcs libadd.a add.o
55 *
66 * Compile the Rust code with:
7- * EMBED_LTO_BITCODE=1 CG_RUSTFLAGS="-L native=. -Clinker-plugin-lto -Clinker=gcc" y cargo run --release
7+ * CG_RUSTFLAGS="-L native=. -Clinker-plugin-lto -Clinker=gcc" y cargo run --release
88 */
99
1010#[ link( name="add" ) ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments