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

[cmake] No depends on intrinsics_gen in standalone #5112

Closed

Conversation

modocache
Copy link
Contributor

The intrinsics_gen target exists only when building Swift "in tree" -- that is, when building Swift within the LLVM source tree. Adding a non-existent intrinsics_gen target in "out of tree" builds results in CMake warning (which are upgraded to hard errors in later versions of CMake, such as 3.4.3).

Prevent the non-existent intrinsics_gen target from being added in out of tree builds by defining a separate list of common dependencies, SWIFT_COMMON_DEPENDS, and using this in place of LLVM_COMMON_DEPENDS. I've added FIXMEs where LLVM functions use LLVM_COMMON_DEPENDS internally, without allowing dependencies to be specified by callers.

Alternatively, it may be possible to simply remove the intrinsics_gen target from the LLVM_COMMON_DEPENDS list when building out of tree. I opted to not pursue this option, since it would involve mutating a global list that may be repercussions elsewhere.

This addresses a suggestion left by @gottesmm and @llvm-beanz on #4999.

The intrinsics_gen target exists only when building Swift "in tree" --
that is, when building Swift within the LLVM source tree. Adding a
non-existent intrinsics_gen target in "out of tree" builds results in
CMake warning (which are upgraded to hard errors in later versions of
CMake, such as 3.4.3).

Prevent the non-existent intrinsics_gen target from being added in
out of tree builds by defining a separate list of common dependencies,
SWIFT_COMMON_DEPENDS, and using this in place of
LLVM_COMMON_DEPENDS. I've added FIXMEs where LLVM functions use
LLVM_COMMON_DEPENDS internally, without allowing dependencies to be
specified by callers.

Alternatively, it may be possible to simply remove the intrinsics_gen target
from the LLVM_COMMON_DEPENDS list when building out of tree. I opted to
not pursue this option, since it would involve mutating a global list
that may be repercussions elsewhere.
@llvm-beanz
Copy link
Contributor

I've committed r283234 to LLVM trunk, which should resolve this issue. What is the process for getting that merged into swift-llvm/stable?

@llvm-beanz
Copy link
Contributor

I pushed the llvm fix into swift-3.1-branch, and it should make its way into swift/stable.

I believe that will make this change unnecessary.

@modocache
Copy link
Contributor Author

Awesome! Thanks, @llvm-beanz! 👍

@modocache modocache closed this Oct 4, 2016
@modocache modocache deleted the cmake-3.4.3-intrinsics-gen branch October 4, 2016 20:18
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.

4 participants