Skip to content

Commit

Permalink
[build][gardening] adjust framework paths (#29507)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
edymtt authored Jan 28, 2020
1 parent 6f026fb commit 5428060
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,12 @@ function(_add_variant_c_compile_link_flags)
endif()

if(IS_DARWIN)
# We collate -F with the framework path to avoid unwanted deduplication
# of options by target_compile_options -- this way no undesired
# side effects are introduced should a new search path be added.
list(APPEND result
"-arch" "${CFLAGS_ARCH}"
"-F" "${SWIFT_SDK_${CFLAGS_SDK}_PATH}/../../../Developer/Library/Frameworks")
"-F${SWIFT_SDK_${CFLAGS_SDK}_PATH}/../../../Developer/Library/Frameworks")

set(add_explicit_version TRUE)

Expand Down Expand Up @@ -405,8 +408,11 @@ function(_add_variant_swift_compile_flags
endif()

if(IS_DARWIN)
# We collate -F with the framework path to avoid unwanted deduplication
# of options by target_compile_options -- this way no undesired
# side effects are introduced should a new search path be added.
list(APPEND result
"-F" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/../../../Developer/Library/Frameworks")
"-F${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/../../../Developer/Library/Frameworks")
endif()

is_build_type_optimized("${build_type}" optimized)
Expand Down

0 comments on commit 5428060

Please sign in to comment.