[cmake] No depends on intrinsics_gen in standalone #5112
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
intrinsics_gen
target exists only when building Swift "in tree" -- that is, when building Swift within the LLVM source tree. Adding a non-existentintrinsics_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 ofLLVM_COMMON_DEPENDS
. I've added FIXMEs where LLVM functions useLLVM_COMMON_DEPENDS
internally, without allowing dependencies to be specified by callers.Alternatively, it may be possible to simply remove the
intrinsics_gen
target from theLLVM_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.