Skip to content
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

build: use modern target property handling #29451

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

compnerd
Copy link
Member

Use specific operations for setting the compile flags, link flags,
linked libraries, and library search paths. This allows us to use CMake
more effectively, simplifies the logic, and will ensure that flags are
not duplicated.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd
Copy link
Member Author

@swift-ci please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6cd1c964273c9fc4a372b9327e204a36f75487ea

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 6cd1c964273c9fc4a372b9327e204a36f75487ea

@compnerd
Copy link
Member Author

@swift-ci please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 04adc974ec0c857ffcca6a5ef7c6a4d6be7f21a8

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 04adc974ec0c857ffcca6a5ef7c6a4d6be7f21a8

@compnerd
Copy link
Member Author

@swift-ci please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 04adc974ec0c857ffcca6a5ef7c6a4d6be7f21a8

@compnerd
Copy link
Member Author

@swift-ci please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 4970eb3e1d0fb7ff18b0d5f615b58866b83b744f

Use specific operations for setting the compile flags, link flags,
linked libraries, and library search paths.  This allows us to use CMake
more effectively, simplifies the logic, and will ensure that flags are
not duplicated.
@compnerd
Copy link
Member Author

@swift-ci please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d8b3b62

@compnerd
Copy link
Member Author

@swift-ci please clean test

@compnerd
Copy link
Member Author

CC: @Rostepher @edymtt @xiaobai

@compnerd compnerd merged commit efa526e into swiftlang:master Jan 27, 2020
@compnerd compnerd deleted the someone-else-can-do-it branch January 27, 2020 16:49
compnerd added a commit to compnerd/apple-swift that referenced this pull request Jan 28, 2020
This should repair the Windows build after swiftlang#29451.  The quoting
behaviour was incorrect and was constructing an invalid compiler
invocation.  Solve the issue by using `target_include_directories`
instead.  However, since this needs the target, hoist the flag
computation to the local sites.  This replicates more logic because of
the custom build trying to replicate the CMake build logic in CMake.
drodriguez added a commit to drodriguez/swift that referenced this pull request Jan 28, 2020
Before the result of `_add_variant_c_compile_flags` was a string, so appending several "-isystem" was not a problem. With swiftlang#29451 the rules have changed since the list is now handled by CMake, and it deduplicates the repeated members in the list. Thanks, CMake.

Should fix the Android CI builds that were failing since the merging of swiftlang#29451.
edymtt added a commit to edymtt/swift that referenced this pull request Jan 28, 2020
Collate -F with the framework path to avoid unwanted deduplication of options by `target_compile_options` (which is the case after swiftlang#29451) -- this way no undesired side effects are introduced should a new search path be added.

Addresses rdar://problem/58934566
edymtt added a commit that referenced this pull request Jan 28, 2020
Collate -F with the framework path to avoid unwanted deduplication of options by `target_compile_options` (which is the case after #29451) -- this way no undesired side effects are introduced should a new search path be added.

Addresses rdar://problem/58934566
edymtt added a commit to edymtt/swift that referenced this pull request Feb 4, 2020
Generator expressions seem not to allow the `LINKER:` prefix to be
expanded correctly when used in `target_link_options`.

To solve this, undo the change from swiftlang#29451 and instead
use an `if` statement to add the flag when needed.

Addresses rdar://problem/59117166
compnerd added a commit that referenced this pull request Feb 5, 2020
This should repair the Windows build after #29451.  The quoting
behaviour was incorrect and was constructing an invalid compiler
invocation.  Solve the issue by using `target_include_directories`
instead.  However, since this needs the target, hoist the flag
computation to the local sites.  This replicates more logic because of
the custom build trying to replicate the CMake build logic in CMake.
finagolfin added a commit to finagolfin/swift that referenced this pull request Jul 29, 2020
There was a mixup in swiftlang#29451 and a CMake flag was dropped, this puts it back.

Resolves SR-13315
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