Skip to content

build: place executable content into the root of the build #515

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

Merged
merged 1 commit into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ set(CMAKE_CXX_STANDARD 11)

set(CMAKE_C_VISIBILITY_PRESET hidden)

# NOTE(compnerd) this is a horrible workaround for Windows to ensure that the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please do this for Windows only, and not for other platforms? I don't think having an identical directory layout between platforms is necessary; each have their own conventions which we should follow.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same thing that LLVM does on all the platforms, as does the Swift project. What do we gain by doing it as a special case here? Furthermore, this is the build tree only, so having the identical directory layout is necessary to keep the overall packaging rules identical. (e.g. copying of files).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right, this is for the build layout, not the installed layout.

# tests can run as there is no rpath equivalent and `PATH` is used to lookup the
# libraries.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ if(ENABLE_SWIFT)
module-maps
DispatchStubs
LINK_FLAGS
-L $<TARGET_LINKER_FILE_DIR:DispatchStubs>
-lDispatchStubs
-L $<TARGET_LINKER_FILE_DIR:BlocksRuntime>
-lBlocksRuntime
Expand Down