From 3ec97f1220677d9cda3f50078140895d704ca676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Thu, 5 Nov 2020 13:22:34 +0100 Subject: [PATCH 1/5] Pick libmonosgen-2.0.so from cmake install directory instead of .libs This aligns Linux with what we already do for all the other platforms. --- src/mono/mono.proj | 2 +- src/mono/mono/mini/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 90385f06c8053..e0b46ab2daadc 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -417,7 +417,7 @@ <_MonoRuntimeFilePath Condition="'$(TargetstvOS)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.dylib <_MonoRuntimeFilePath Condition="'$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeFilePath Condition="'$(TargetsBrowser)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a - <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == ''">$(MonoObjDir)mono\mini\.libs\libmonosgen-2.0.so + <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == ''">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeStaticFilePath Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a <_MonoIncludeInterpStaticFiles Condition="'$(TargetsBrowser)' == 'true' or ('$(TargetsiOS)' == 'true' and '$(TargetsiOSSimulator)' != 'true')">true diff --git a/src/mono/mono/mini/CMakeLists.txt b/src/mono/mono/mini/CMakeLists.txt index 41147d935118e..4ac1d370e29d8 100644 --- a/src/mono/mono/mini/CMakeLists.txt +++ b/src/mono/mono/mini/CMakeLists.txt @@ -304,7 +304,6 @@ endif() if(NOT DISABLE_SHARED_LIBS) add_library(monosgen SHARED $) set_target_properties(monosgen PROPERTIES OUTPUT_NAME monosgen-2.0) - set_target_properties(monosgen PROPERTIES LIBRARY_OUTPUT_DIRECTORY .libs) target_link_libraries(monosgen ${OS_LIBS} ${ICONV_LIB} ${LLVM_LIBS} ${ICU_LIBS}) if(ICU_LDFLAGS) set_target_properties(monosgen PROPERTIES LINK_FLAGS ${ICU_LDFLAGS}) From 26a6a1889aba04a3f0059b146622a177cdcc98ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Thu, 5 Nov 2020 14:09:00 +0100 Subject: [PATCH 2/5] Fix path for Linux x64 --- src/mono/mono.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index e0b46ab2daadc..42facd8e1f3f1 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -417,6 +417,7 @@ <_MonoRuntimeFilePath Condition="'$(TargetstvOS)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.dylib <_MonoRuntimeFilePath Condition="'$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeFilePath Condition="'$(TargetsBrowser)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a + <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == '' and '$(TargetsLinux)' == 'true' and '$(TargetArchitecture)' == 'x64'">$(MonoObjDir)out\lib64\libmonosgen-2.0.so <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == ''">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeStaticFilePath Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a <_MonoIncludeInterpStaticFiles Condition="'$(TargetsBrowser)' == 'true' or ('$(TargetsiOS)' == 'true' and '$(TargetsiOSSimulator)' != 'true')">true From 8c8e737c9808436c1e9d0a7daacf584aefa65fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Thu, 5 Nov 2020 19:16:18 +0100 Subject: [PATCH 3/5] Simplify a bit more --- src/mono/mono.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 42facd8e1f3f1..89d92f8b570d4 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -417,7 +417,7 @@ <_MonoRuntimeFilePath Condition="'$(TargetstvOS)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.dylib <_MonoRuntimeFilePath Condition="'$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeFilePath Condition="'$(TargetsBrowser)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a - <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == '' and '$(TargetsLinux)' == 'true' and '$(TargetArchitecture)' == 'x64'">$(MonoObjDir)out\lib64\libmonosgen-2.0.so + <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == '' and Exists('$(MonoObjDir)out\lib64\libmonosgen-2.0.so')">$(MonoObjDir)out\lib64\libmonosgen-2.0.so <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == ''">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeStaticFilePath Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a <_MonoIncludeInterpStaticFiles Condition="'$(TargetsBrowser)' == 'true' or ('$(TargetsiOS)' == 'true' and '$(TargetsiOSSimulator)' != 'true')">true From 0e7a393137a8682678f75480f1d27966cbc991dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Thu, 5 Nov 2020 19:48:26 +0100 Subject: [PATCH 4/5] PR feedback --- src/mono/mono.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 89d92f8b570d4..15f04c2481f4b 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -142,6 +142,7 @@ <_MonoCMakeArgs Condition="'$(MonoBuildTool)' == 'ninja'" Include="-G Ninja"/> <_MonoCMakeArgs Include="-DCMAKE_INSTALL_PREFIX=$(MonoObjDir)out"/> + <_MonoCMakeArgs Include="-DCMAKE_INSTALL_LIBDIR=lib"/> <_MonoCMakeArgs Include="-DCMAKE_BUILD_TYPE=$(Configuration)"/> <_MonoCMakeArgs Condition="'$(MonoEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoLLVMDir)" /> @@ -417,7 +418,6 @@ <_MonoRuntimeFilePath Condition="'$(TargetstvOS)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.dylib <_MonoRuntimeFilePath Condition="'$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeFilePath Condition="'$(TargetsBrowser)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a - <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == '' and Exists('$(MonoObjDir)out\lib64\libmonosgen-2.0.so')">$(MonoObjDir)out\lib64\libmonosgen-2.0.so <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == ''">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeStaticFilePath Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a <_MonoIncludeInterpStaticFiles Condition="'$(TargetsBrowser)' == 'true' or ('$(TargetsiOS)' == 'true' and '$(TargetsiOSSimulator)' != 'true')">true From 616e94901c40ba9d933ba36a111b69d605d70951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Thu, 5 Nov 2020 20:07:58 +0100 Subject: [PATCH 5/5] PR feedback --- src/mono/mono.proj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 15f04c2481f4b..95f46723df975 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -416,7 +416,6 @@ <_MonoRuntimeFilePath Condition="'$(TargetsOSX)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.dylib <_MonoRuntimeFilePath Condition="'$(TargetsiOS)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.dylib <_MonoRuntimeFilePath Condition="'$(TargetstvOS)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.dylib - <_MonoRuntimeFilePath Condition="'$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeFilePath Condition="'$(TargetsBrowser)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a <_MonoRuntimeFilePath Condition="'$(_MonoRuntimeFilePath)' == ''">$(MonoObjDir)out\lib\libmonosgen-2.0.so <_MonoRuntimeStaticFilePath Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsAndroid)' == 'true'">$(MonoObjDir)out\lib\libmonosgen-2.0.a