Skip to content

[6.2][Driver][Frontend] -nostdimport and -nostdlibimport should remove the default framework search paths #81621

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

Conversation

ian-twilightcoder
Copy link
Contributor

@ian-twilightcoder ian-twilightcoder requested a review from a team as a code owner May 19, 2025 20:19
@nkcsgexi
Copy link
Contributor

Could you elaborate on why is this important on release/6.2?

@nkcsgexi
Copy link
Contributor

Had a discussion with Ian offline and this seems to be necessary for some clients' build.

…e the default framework search paths

-nostdimport and -nostdlibimport only remove the toolchain and usr/lib/swift search paths, and they leave the framework search paths intact. That makes it impossible to get a fully custom SDK environment. Make their behavior match clang's -nostdinc/-nostdlibinc behavior: treat framework and non-framework paths the same. In other words, -nostdinc removes *all* compiler provided search paths, and -nostdlibinc removes *all* SDK search paths.

Rename SkipRuntimeLibraryImportPaths to SkipAllImportPaths, and ExcludeSDKPathsFromRuntimeLibraryImportPaths to SkipSDKImportPaths to reflect their updated behavior.

Move the DarwinImplicitFrameworkSearchPaths handling from SearchPathOptions to CompilerInvocation, where RuntimeLibraryImportPaths is managed. Rename it to just ImplicitFrameworkSearchPaths, and filter for Darwin when it's set up so that all of the clients don't have to do Darwin filtering themselves later.

rdar://150557632
@ian-twilightcoder ian-twilightcoder force-pushed the nostdimport-remove-framework-paths branch from e8b2799 to 44b2c08 Compare May 24, 2025 05:12
@ian-twilightcoder
Copy link
Contributor Author

@swift-ci test

@ian-twilightcoder ian-twilightcoder merged commit 17d8955 into swiftlang:release/6.2 May 29, 2025
5 checks passed
@ian-twilightcoder ian-twilightcoder deleted the nostdimport-remove-framework-paths branch May 29, 2025 20:16
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