Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,10 @@ jobs:
git config --global user.name "User"
./y.sh prepare

- name: Add more failing tests because of undefined symbol errors (FIXME)
run: cat tests/failing-lto-tests.txt >> tests/failing-ui-tests.txt

- name: Run tests
run: |
# FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros.
# FIXME(antoyo): this should probably not be needed since we embed the LTO bitcode.
printf '[profile.release]\nlto = "fat"\n' >> build/build_sysroot/sysroot_src/library/Cargo.toml
./y.sh test --release --clean --release-sysroot --build-sysroot --keep-lto-tests ${{ matrix.commands }}
CG_RUSTFLAGS="-Cembed-bitcode=yes" ./y.sh test --release --clean --release-sysroot --build-sysroot --keep-lto-tests ${{ matrix.commands }}

- name: LTO test
run: |
Expand All @@ -99,7 +94,7 @@ jobs:
ar rcs libadd.a add.o
popd

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
CHANNEL="release" CG_RUSTFLAGS="-L native=. -Clinker-plugin-lto -Clinker=gcc" ./y.sh cargo build --release --manifest-path tests/cross_lang_lto/Cargo.toml
call_found=$(objdump -dj .text tests/cross_lang_lto/target/release/cross_lang_lto | grep -c "call .*my_add" ) ||:
if [ $call_found -gt 0 ]; then
echo "ERROR: call my_add found in asm"
Expand Down
2 changes: 0 additions & 2 deletions src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ pub(crate) fn codegen(
if lto_supported {
context.add_command_line_option("-flto=auto");
context.add_command_line_option("-flto-partition=one");
// TODO(antoyo): remove since we don't want fat objects when it is for Bitcode only.
context.add_command_line_option("-ffat-lto-objects");
}
context
.compile_to_file(OutputKind::ObjectFile, bc_out.to_str().expect("path to str"));
Expand Down
2 changes: 1 addition & 1 deletion tests/cross_lang_lto/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* ar rcs libadd.a add.o
*
* Compile the Rust code with:
* EMBED_LTO_BITCODE=1 CG_RUSTFLAGS="-L native=. -Clinker-plugin-lto -Clinker=gcc" y cargo run --release
* CG_RUSTFLAGS="-L native=. -Clinker-plugin-lto -Clinker=gcc" y cargo run --release
*/

#[link(name="add")]
Expand Down
33 changes: 0 additions & 33 deletions tests/failing-lto-tests.txt

This file was deleted.