Skip to content

Conversation

@al45tair
Copy link
Contributor

Add a -build-id option to the driver to let users control the build ID setting used by the linker. Pass --build-id to the linker by default, so that build IDs are enabled by default but using the linker's default type; if someone wishes to specify a particular option, they can do so using the new driver option.

Also turn on build IDs when building the driver.

rdar://116798309

@al45tair al45tair requested a review from artemcm June 26, 2024 12:50
@al45tair
Copy link
Contributor Author

@swift-ci Please test

@al45tair al45tair requested a review from etcwilde July 1, 2024 15:27
public static let bridgingHeaderDirectoryForPrint: Option = Option("-bridging-header-directory-for-print", .separate, attributes: [.helpHidden, .frontend, .noDriver], metaVar: "<path>", helpText: "Directory for bridging header to be printed in compatibility header")
public static let bridgingHeaderPchKey: Option = Option("-bridging-header-pch-key", .separate, attributes: [.helpHidden, .frontend, .noDriver], helpText: "Cache Key for bridging header pch")
public static let bsdk: Option = Option("-bsdk", .joinedOrSeparate, attributes: [.noDriver, .argumentIsPath], helpText: "path to the baseline SDK to import frameworks")
public static let buildIdEQ: Option = Option("-build-id=", .joined, alias: Option.buildId)
Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM.
The usual reminder that these Options.swift are to be generated as follows:
https://github.com/swiftlang/swift-driver?tab=readme-ov-file#rebuilding-optionsswift
In case they were not, for this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, interesting. They were not. I will investigate that — thank you.

al45tair added 2 commits July 23, 2024 09:55
Add a `-build-id` option to the driver to let users control the build
ID setting used by the linker.  Pass `--build-id` to the linker by default,
so that build IDs are enabled by default but using the linker's default
type; if someone wishes to specify a particular option, they can do so
using the new driver option.

Also turn on build IDs when *building* the driver.

rdar://116798309
Options.swift needs to be generated from the one in the Swift repo,
not edited by hand.

Based on the Options.td from swiftlang/swift#75435.

rdar://116798309
@al45tair
Copy link
Contributor Author

al45tair commented Jul 24, 2024

@artemcm Hmmm. Looks like I'm not the only one that's edited Options.swift directly. Or maybe not updated it after changing Options.td.

@al45tair al45tair requested a review from artemcm July 24, 2024 11:02
@al45tair
Copy link
Contributor Author

@swift-ci Please test

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.

2 participants