Skip to content

Disable _StringProcessing import in _CompilerPluginSupport #62042

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 1 commit into from
Nov 16, 2022

Conversation

rxwei
Copy link
Contributor

@rxwei rxwei commented Nov 10, 2022

Reduce dependencies for rdar://102207474.

@rxwei rxwei requested a review from DougGregor November 10, 2022 23:21
@rxwei
Copy link
Contributor Author

rxwei commented Nov 10, 2022

@swift-ci please smoke test

@rxwei rxwei force-pushed the plugin-disable-sp-import branch from f3394bc to e68effb Compare November 11, 2022 02:08
@rxwei
Copy link
Contributor Author

rxwei commented Nov 11, 2022

@swift-ci please smoke test

@rxwei
Copy link
Contributor Author

rxwei commented Nov 11, 2022

<unknown>:0: error: unknown argument: '-disable-implicit-string-processing-module-import'

I thought the frontend would ignore unknown flags? @DougGregor

@edymtt
Copy link
Contributor

edymtt commented Nov 15, 2022

You may need to detect if the compiler supports the flag, like Doug did for ASTGen -- #61889

@rxwei rxwei force-pushed the plugin-disable-sp-import branch from e68effb to 3423e4a Compare November 15, 2022 20:29
@rxwei
Copy link
Contributor Author

rxwei commented Nov 15, 2022

@swift-ci please test

@rxwei
Copy link
Contributor Author

rxwei commented Nov 16, 2022

@swift-ci please smoke test macOS

1 similar comment
@rxwei
Copy link
Contributor Author

rxwei commented Nov 16, 2022

@swift-ci please smoke test macOS

@rxwei
Copy link
Contributor Author

rxwei commented Nov 16, 2022

Failed Tests (1):
  lldb-api :: lang/swift/clangimporter/static_archive/TestSwiftStaticArchiveTwoSwiftmodules.py

🙄

@rxwei
Copy link
Contributor Author

rxwei commented Nov 16, 2022

@swift-ci please smoke test macos

@rxwei rxwei merged commit 2471d70 into swiftlang:main Nov 16, 2022
@rxwei rxwei deleted the plugin-disable-sp-import branch November 16, 2022 16:01
RESULT_VARIABLE
SWIFT_SUPPORTS_DISABLE_IMPLICIT_STRING_PROCESSING_MODULE_IMPORT)
if(NOT SWIFT_SUPPORTS_DISABLE_IMPLICIT_STRING_PROCESSING_MODULE_IMPORT)
add_compile_options(
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be best to apply this directly to the target, to match what we did before
(also because calling add_compile_options after add_library will likely have no effect)

Suggested change
add_compile_options(
target_compile_options("${library_name}" PRIVATE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the same as #61889. Should I change this in ASTGen too?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not in this PR, it can be done at a later time -- I suspect in there it works because we call add_library after add_compile_options)

If you are concerned about having different code paths, you can move this section before add_library, and tackle changing the CMake command used at a later time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rxwei added a commit to rxwei/swift that referenced this pull request Nov 17, 2022
Reduce dependencies for rdar://102207474. Amends the incomplete patch in swiftlang#62042.
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