Skip to content

Conversation

@xymus
Copy link
Contributor

@xymus xymus commented Sep 3, 2021

Set the feature flag library-level to indicate the availability of the -library-level flag in the compiler and driver. As the driver isn't in perfect sync with the compiler let's integrating this flag late to be safe.

rdar://82742547

Set the flag to indicate the availability of the -library-level flag in
the compiler and driver. As driver submissions can be delayed we are
integrating this flag late as a safety measure.

rdar://82742547
@xymus
Copy link
Contributor Author

xymus commented Sep 3, 2021

@swift-ci Please smoke test

@nkcsgexi
Copy link
Contributor

nkcsgexi commented Sep 3, 2021

The driver side could check whether a flag is supported by the compiler by calling Driver.isFrontendArgSupported.

@xymus
Copy link
Contributor Author

xymus commented Sep 7, 2021

@nkcsgexi In this case the compiler flag has been present for a while, I would need to check if the driver itself accepts the flag. Artem showed me a a feature designed for this but from what I understand it's not currently usable in practice. Is there another solution for such a case?

@swift-ci Please smoke test linux

@nkcsgexi
Copy link
Contributor

nkcsgexi commented Sep 7, 2021

ah, Thanks for the explanation! I think this only applies to the driver-as-executable scenario because we don't have access to driver APIs from the build systems. In that case, adding the feature list to the compiler side may not be sufficient because the driver may be older than the compiler. Instead, could you add the feature list to the swift-driver side? The build system could then ask supported features of the driver.

@xymus
Copy link
Contributor Author

xymus commented Sep 9, 2021

It looks like the driver support for the flag landed where we needed it to. We can now turn this flag on safely.

It looks to me like the existing feature flag system in the driver is a better approach for this, I'd rather avoid duplicating it unless we absolutely need to.

@xymus
Copy link
Contributor Author

xymus commented Sep 9, 2021

@swift-ci Please smoke test

@xymus
Copy link
Contributor Author

xymus commented Sep 10, 2021

@swift-ci Please smoke test macOS

1 similar comment
@xymus
Copy link
Contributor Author

xymus commented Sep 10, 2021

@swift-ci Please smoke test macOS

@xymus xymus merged commit 4164b2e into swiftlang:main Sep 10, 2021
@xymus xymus deleted the library-level-feature-flag branch September 10, 2021 21:59
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