Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 7fcbfaa

Browse files
committed
Merge pull request #80 from sergiy-k/binplace-on-linux
Enable binplacing of native CoreCLR binaries on Linux
2 parents cbf5cbf + cf0508a commit 7fcbfaa

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

build.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ build_coreclr()
6464
{
6565
# All set to commence the build
6666

67-
echo Commencing build of native components for %__BuildArch%/%__BuildType%
67+
echo Commencing build of native components for $__BuildArch/$__BuildType
6868
cd $__CMakeSlnDir
6969

7070
# Regenerate the CMake solution
@@ -81,7 +81,7 @@ build_coreclr()
8181
# Build CoreCLR
8282

8383
echo Executing make $__UnprocessedBuildArgs
84-
make -j `nproc` $__UnprocessedBuildArgs
84+
make install -j `nproc` $__UnprocessedBuildArgs
8585
if [ $? != 0 ]; then
8686
echo Failed to build coreclr components.
8787
exit 1
@@ -148,6 +148,10 @@ __ToolsDir="$__RootBinDir/tools"
148148
__TestWorkingDir="$__RootBinDir/tests/$__BuildArch/$__BuildType"
149149
__IntermediatesDir="$__RootBinDir/intermediates/$__BuildArch/$__BuildType"
150150

151+
# Specify path to be set for CMAKE_INSTALL_PREFIX.
152+
# This is where all built CoreClr libraries will copied to.
153+
export __CMakeBinDir="$__BinDir"
154+
151155
# Switch to clean build mode if the binaries output folder does not exist
152156
if [ ! -d "$__RootBinDir" ]; then
153157
__CleanBuild=1

src/coreclr/hosts/unixcorerun/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ target_link_libraries(corerun
1515
add_dependencies(corerun
1616
coreclr
1717
)
18+
19+
install (TARGETS corerun DESTINATION .)

src/dlls/mscordac/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,6 @@ target_link_libraries(mscordaccore ${COREDAC_LIBRARIES})
7575

7676
# add the install targets
7777
install (TARGETS mscordaccore DESTINATION .)
78-
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/mscordaccore.pdb DESTINATION PDB)
78+
if(WIN32)
79+
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/mscordaccore.pdb DESTINATION PDB)
80+
endif(WIN32)

src/dlls/mscoree/coreclr/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,7 @@ endif(WIN32)
106106

107107
# add the install targets
108108
install (TARGETS coreclr DESTINATION .)
109-
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/coreclr.pdb DESTINATION PDB)
109+
if(WIN32)
110+
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/coreclr.pdb DESTINATION PDB)
111+
endif(WIN32)
110112

src/pal/tools/clang-compiler-override.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ SET (CLR_DEFINES_DEBUG_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Ch
1212
SET (CLR_DEFINES_RELEASE_INIT NDEBUG URTBLDENV_FRIENDLY=Retail)
1313
SET (CLR_DEFINES_RELWITHDEBINFO_INIT NDEBUG URTBLDENV_FRIENDLY=Retail)
1414

15+
SET (CMAKE_INSTALL_PREFIX $ENV{__CMakeBinDir})

0 commit comments

Comments
 (0)