-
Notifications
You must be signed in to change notification settings - Fork 14.6k
[DTLTO][Clang] Add support for Integrated Distributed ThinLTO #147265
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
Merged
+117
−19
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
737bb8c
[DTLTO][Clang] Add support for Integrated Distributed ThinLTO
bd1976bris af66910
Avoid committing to any work on Sony’s behalf that’s beyond my remit.
bd1976bris fd51379
shorten argument strings for readability
bd1976bris f2c6b8d
Use meaningful prefixes for all check lines.
bd1976bris cdce7ff
NOMORE -> --implicit-check-not
bd1976bris 75289e7
Use shared response files for all FileCheck invocations.
bd1976bris bb2f7d3
Simplify test by including more arguments in linker shared response file
bd1976bris 00321cf
Improve match for clang executable
bd1976bris fb25cda
Removed unneeded -Werror as we can rely on the implicit check not check
bd1976bris 44abe76
Introduce a second linker response file which will simplify the test …
bd1976bris 820a50d
Move option handling into addLTOOptions for consistency.
bd1976bris 60e87c9
On linux the clang exectuable might be clang-20. Fix match.
bd1976bris c961cc0
Use %/s consistently in response files.
bd1976bris 93dda6f
Use -Werror and remove FileCheck response file
bd1976bris c8e8305
Remove other response file usage
bd1976bris 1b0257c
Replace accidentally dropped implicit check not lines
bd1976bris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// REQUIRES: lld | ||
|
||
/// Check DTLTO options are forwarded to the linker. | ||
|
||
/// Check that options are forwarded as expected with --thinlto-distributor=. | ||
// RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ | ||
// RUN: -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 \ | ||
// RUN: -fthinlto-distributor=d.exe -Werror 2>&1 | \ | ||
// RUN: FileCheck %s --check-prefix=FORWARD | ||
|
||
// FORWARD: ld.lld | ||
// FORWARD-SAME: "--thinlto-distributor=d.exe" | ||
// FORWARD-SAME: "--thinlto-remote-compiler={{.*}}clang{{[^\"]*}}" | ||
// FORWARD-SAME: "--thinlto-distributor-arg=a1" | ||
// FORWARD-SAME: "--thinlto-distributor-arg=a2" | ||
// FORWARD-SAME: "--thinlto-distributor-arg=a3" | ||
|
||
/// Check that options are not added without --thinlto-distributor= and | ||
/// that a warning is issued for unused -Xthinlto-distributor options. | ||
// RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ | ||
// RUN: -Xthinlto-distributor=a1 -Xthinlto-distributor=a2,a3 2>&1 | \ | ||
// RUN: FileCheck %s --check-prefix=NODIST --implicit-check-not=distributor \ | ||
// RUN: --implicit-check-not=remote-compiler | ||
|
||
// NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a1' | ||
// NODIST: warning: argument unused during compilation: '-Xthinlto-distributor=a2,a3' | ||
// NODIST: ld.lld | ||
|
||
/// Check the expected arguments are forwarded by default with only | ||
/// --thinlto-distributor=. | ||
// RUN: %clang -flto=thin %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ | ||
// RUN: -fthinlto-distributor=d.exe -Werror 2>&1 | \ | ||
// RUN: FileCheck %s --check-prefix=DEFAULT --implicit-check-not=distributor \ | ||
// RUN: --implicit-check-not=remote-compiler | ||
|
||
// DEFAULT: ld.lld | ||
// DEFAULT-SAME: "--thinlto-distributor=d.exe" | ||
// DEFAULT-SAME: "--thinlto-remote-compiler={{.*}}clang{{[^\"]*}}" | ||
|
||
/// Check that nothing is forwarded when the compiler is not in LTO mode, and that | ||
/// appropriate unused option warnings are issued. | ||
// RUN: %clang %s -### -fuse-ld=lld --target=x86_64-linux-gnu \ | ||
// RUN: -fthinlto-distributor=d.exe 2>&1 | \ | ||
// RUN: FileCheck %s --check-prefix=NOFLTO --implicit-check-not=distributor \ | ||
// RUN: --implicit-check-not=remote-compiler | ||
|
||
// NOFLTO: warning: argument unused during compilation: '-fthinlto-distributor=d.exe' | ||
// NOFLTO: ld.lld |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.