Files
swift-mirror/lib/Driver/CMakeLists.txt
Michael Gottesman 8437819b5a [CMake] Revert recent changes.
These changes caused a number of issues:

1. No debug info is emitted when a release-debug info compiler is built.
2. OS X deployment target specification is broken.
3. Swift options were broken without any attempt any recreating that
functionality. The specific option in question is --force-optimized-typechecker.

Such refactorings should be done in a fashion that does not break existing
users and use cases.

This reverts commit e6ce2ff388.
This reverts commit e8645f3750.
This reverts commit 89b038ea7e.
This reverts commit 497cac64d9.
This reverts commit 953ad094da.
This reverts commit e096d1c033.

rdar://30549345
2017-02-15 22:26:06 -08:00

59 lines
1.9 KiB
CMake

set(swiftDriver_sources
Action.cpp
Compilation.cpp
DependencyGraph.cpp
Driver.cpp
FrontendUtil.cpp
Job.cpp
OutputFileMap.cpp
ParseableOutput.cpp
ToolChain.cpp
ToolChains.cpp
Types.cpp
)
set(swiftDriver_targetDefines)
add_swift_library(swiftDriver STATIC
${swiftDriver_sources}
DEPENDS SwiftOptions
LINK_LIBRARIES swiftAST swiftBasic swiftFrontend swiftOption)
# Generate the static-stdlib-args.lnk file used by -static-stdlib option
# for 'GenericUnix' (eg linux)
if(SWIFT_BUILD_STATIC_STDLIB)
set(static_stdlib_lnk_file_list)
foreach(sdk ${SWIFT_CONFIGURED_SDKS})
if("${SWIFT_SDK_${sdk}_OBJECT_FORMAT}" STREQUAL "ELF")
string(TOLOWER "${sdk}" lowercase_sdk)
if(SWIFT_LINUX_ICU_STATICLIB)
set(ICU_STATICLIB "TRUE")
else()
set(ICU_STATICLIB "FALSE")
find_package(ICU REQUIRED COMPONENTS uc i18n)
get_filename_component(ICU_UC_LIBDIR "${ICU_UC_LIBRARY}" DIRECTORY)
get_filename_component(ICU_I18N_LIBDIR "${ICU_I18N_LIBRARY}" DIRECTORY)
endif()
set(linkfile "${lowercase_sdk}/static-stdlib-args.lnk")
add_custom_command_target(swift_static_stdlib_${sdk}_args
COMMAND
"${SWIFT_SOURCE_DIR}/utils/gen-static-stdlib-link-args"
"${sdk}"
"${SWIFTSTATICLIB_DIR}/${linkfile}"
"${ICU_STATICLIB}"
"${ICU_UC_LIBDIR}"
"${ICU_I18N_LIBDIR}"
OUTPUT
"${SWIFTSTATICLIB_DIR}/${linkfile}"
DEPENDS
"${SWIFT_SOURCE_DIR}/utils/gen-static-stdlib-link-args")
list(APPEND static_stdlib_lnk_file_list ${swift_static_stdlib_${sdk}_args})
swift_install_in_component(stdlib
FILES "${SWIFTSTATICLIB_DIR}/${linkfile}"
DESTINATION "lib/swift_static/${lowercase_sdk}")
endif()
endforeach()
add_custom_target(swift_static_lnk_args ALL DEPENDS ${static_stdlib_lnk_file_list})
endif()