-
Notifications
You must be signed in to change notification settings - Fork 56
Add option for generating -include directives in dependency file
#531
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -562,6 +562,10 @@ Folder where the built partially linked segments will be placed by the build sys | |
|
|
||
| Generate a dependency file for every linker script generated. Dependency files will have the same path and name as the corresponding linker script, but changing the extension to `.d`. Requires `elf_path` to be set. | ||
|
|
||
| ### ld_dependencies_include | ||
|
|
||
| Emit an `-include` directive in the generated dependency file that includes .o file dependencies if they exist. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explain a little more what this new feature does and why people may (or may not) want it. a few examples would be nice too. |
||
|
|
||
| ### ld_legacy_generation | ||
|
|
||
| Currently splat imposes the given `section_order` when generating the linker script. But in some cases it may not be desirable to impose the section ordering because the ROM itself may not follow a logical section ordering. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,6 +139,8 @@ class SplatOpts: | |
| ld_partial_build_segments_path: Optional[Path] | ||
| # Generate a dependency file for every linker script generated. Dependency files will have the same path and name as the corresponding linker script, but changing the extension to `.d`. Requires `elf_path` to be set. | ||
| ld_dependencies: bool | ||
| # Emit an `-include` directive for each object file in the dependency file. | ||
| ld_dependencies_include: bool | ||
| # Legacy linker script generation does not impose the section_order specified in the yaml options or per-segment options. | ||
| ld_legacy_generation: bool | ||
| # If enabled, the end symbol for each segment will be placed before the alignment directive for the segment | ||
|
|
@@ -531,6 +533,7 @@ def parse_include_asm_macro_style() -> Literal["default", "maspsx_hack"]: | |
| base_path, "ld_partial_build_segments_path" | ||
| ), | ||
| ld_dependencies=p.parse_opt("ld_dependencies", bool, False), | ||
| ld_dependencies_include=p.parse_opt("ld_dependencies_include", bool, False), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should be fine to make it default to |
||
| ld_legacy_generation=p.parse_opt("ld_legacy_generation", bool, False), | ||
| segment_end_before_align=p.parse_opt("segment_end_before_align", bool, False), | ||
| segment_symbols_style=p.parse_opt_within( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, a bit more of explanation.