Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Link-Time Optimization #278

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Conversation

antoyo
Copy link
Contributor

@antoyo antoyo commented May 26, 2023

Fix #64.

Cargo.toml Show resolved Hide resolved
Readme.md Outdated
@@ -182,6 +182,10 @@ set substitute-path /usr/src/debug/gcc /path/to/gcc-repo/gcc

TODO(antoyo): but that's not what I remember I was doing.

### How to debug GCC LTO

Run do the command with `-v -save-temps` and then extract the `lto1` line from the output and run that under the debugger
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to wire up -Csave-temps to GCC's -save-temps option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember what's the output of GCC's -save-temps. Does cg_llvm output LLVM-specific stuff (except some stuff done manually like the bitcode used for LTO)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLVM doesn't produce intermediate files afaik. It keeps everything in memory until rustc explicitly tells it to either write bitcode or an object files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I'll keep it that way for now and we'll see later.

@antoyo antoyo force-pushed the feature/lto_2023-05-12 branch 11 times, most recently from 6266d40 to aa701c0 Compare August 19, 2023 01:11
test.sh Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@antoyo antoyo force-pushed the feature/lto_2023-05-12 branch 14 times, most recently from 8679c60 to fd4dee2 Compare August 21, 2023 16:41
@antoyo antoyo force-pushed the feature/lto_2023-05-12 branch 10 times, most recently from 31e7433 to 47de037 Compare August 25, 2023 19:17
Cargo.toml Outdated Show resolved Hide resolved
build_sysroot/Cargo.toml Outdated Show resolved Hide resolved
src/back/lto.rs Outdated Show resolved Hide resolved
test.sh Outdated Show resolved Hide resolved
@antoyo antoyo force-pushed the feature/lto_2023-05-12 branch 8 times, most recently from 9d62918 to 6b6000b Compare August 29, 2023 18:31
@antoyo antoyo mentioned this pull request Aug 29, 2023
@antoyo antoyo force-pushed the feature/lto_2023-05-12 branch 3 times, most recently from 9aa28b0 to e00e89c Compare August 30, 2023 22:33
@antoyo antoyo merged commit 4e41a8a into master Aug 31, 2023
42 of 64 checks passed
@antoyo antoyo deleted the feature/lto_2023-05-12 branch August 31, 2023 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for LTO
2 participants