-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Linux][Runtime][IRGen] Mark metadata sections as retained and support section GC. #72061
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
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
3c029eb
[IRGen] Use llvm.used on ELF instead of llvm.compiler.used.
al45tair b755724
[Runtime] Tidy up section declarations slightly.
al45tair c9dcee2
[RemoteInspection] Update ReflectionContext to cope with multiple sec…
al45tair 0a5653d
[IRGen] When creating a module object, mark `__Swift_AST` as used.
al45tair a363719
[IRGen] Set `TargetOpts.UseInitArray` in `getIRTargetOptions()`.
al45tair 8ba1d98
[Test] Fix function_sections test to support different linkers.
al45tair f9ec479
[Test] Add linker_overridden feature.
al45tair cb4fd88
[RemoteInspection] Use `bool` instead of `!!`.
al45tair 9d9c123
[Test] Update section_asm to work on non-ELF platforms again.
al45tair bc64f6d
[RemoteInspection] Add a big comment to ReflectionContext.h.
al45tair 554c402
[Runtime] Add the `retain` attribute to make the backtracer work.
al45tair 7698836
[Test][SourceKit] Use the *builder*'s swiftrt.o when in hosttools.
al45tair 7df249b
[Runtime] Tidy up a couple of minor nits.
al45tair f5b1ef7
[RemoteInspection] Change "return false" to "return {}".
al45tair a014bd2
[Build] Detect ld.gold version and prefer lld if gold is too old.
al45tair 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Find the version of ld.gold, if installed. | ||
# | ||
# Versions prior to 2.36 break Swift programs because they won't coalesce | ||
# sections with different SHF_GNU_RETAIN flags. | ||
function(get_gold_version result_var_name) | ||
find_program(gold_executable "ld.gold") | ||
if(gold_executable) | ||
execute_process( | ||
COMMAND "${gold_executable}" "--version" | ||
COMMAND "head" "-n" "1" | ||
COMMAND "sed" "-e" "s/^.* (\\([^)]*\\)).*$/\\1/g;s/.* \\([0-9][0-9]*\\(\\.[0-9][0-9]*\\)*\\).*/\\1/g" | ||
OUTPUT_VARIABLE gold_version | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
set("${result_var_name}" "${gold_version}" PARENT_SCOPE) | ||
else() | ||
set("${result_var_name}" "" PARENT_SCOPE) | ||
endif() | ||
endfunction() |
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
Oops, something went wrong.
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.