Convert version.cpp to C
authorkasper3 <33230602+kasper3@users.noreply.github.com>
Mon, 25 Jun 2018 20:05:58 +0000 (20:05 +0000)
committerFilip Navara <filip.navara@gmail.com>
Sun, 3 Feb 2019 10:17:57 +0000 (11:17 +0100)
Commit migrated from https://github.com/dotnet/coreclr/commit/db8dbe8a005beec124eaac1adcfa30d4715338bd

src/coreclr/CMakeLists.txt
src/coreclr/build.sh
src/coreclr/src/corefx/System.Globalization.Native/CMakeLists.txt

index 31b814f..a9649e6 100644 (file)
@@ -24,7 +24,7 @@ set(CLR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 set(VM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/vm)
 set(GENERATED_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/inc)
 set(GENERATED_EVENTING_DIR ${CMAKE_CURRENT_BINARY_DIR}/eventing)
-set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/version.cpp")
+set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/version.c")
 set(PAL_REDEFINES_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/dlls/mscordac/palredefines.S)
 
 set(CORECLR_SET_RPATH ON)
index 72d0456..536dbe8 100755 (executable)
@@ -293,8 +293,8 @@ build_native()
     if [ $__SkipConfigure == 0 ]; then
         # if msbuild is not supported, then set __SkipGenerateVersion to 1
         if [ $__isMSBuildOnNETCoreSupported == 0 ]; then __SkipGenerateVersion=1; fi
-        # Drop version.cpp file
-        __versionSourceFile="$intermediatesForBuild/version.cpp"
+        # Drop version.c file
+        __versionSourceFile="$intermediatesForBuild/version.c"
         if [ $__SkipGenerateVersion == 0 ]; then
             pwd
             "$__ProjectRoot/dotnet.sh" msbuild /nologo /verbosity:minimal /clp:Summary \
@@ -304,7 +304,7 @@ build_native()
                                        "$__ProjectDir/build.proj" /p:GenerateVersionSourceFile=true /t:GenerateVersionSourceFile /p:NativeVersionSourceFile=$__versionSourceFile \
                                        $__CommonMSBuildArgs $__UnprocessedBuildArgs
         else
-            # Generate the dummy version.cpp, but only if it didn't exist to make sure we don't trigger unnecessary rebuild
+            # Generate the dummy version.c, but only if it didn't exist to make sure we don't trigger unnecessary rebuild
             __versionSourceLine="static char sccsid[] __attribute__((used)) = \"@(#)No version information produced\";"
             if [ -e $__versionSourceFile ]; then
                 read existingVersionSourceLine < $__versionSourceFile
index c44498f..026e5bb 100644 (file)
@@ -71,12 +71,6 @@ _add_library(System.Globalization.Native_Static
 # Disable the "lib" prefix.
 set_target_properties(System.Globalization.Native PROPERTIES PREFIX "")
 
-# Force CMake to not link against libstdc++
-# http://cmake.3232098.n2.nabble.com/setting-LINKER-LANGUAGE-still-adds-lstdc-td7581940.html
-set_target_properties(System.Globalization.Native PROPERTIES LINKER_LANGUAGE "C")
-set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
-set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "")
-
 # Disable the "lib" prefix and override default name
 set_target_properties(System.Globalization.Native_Static PROPERTIES PREFIX "")
 set_target_properties(System.Globalization.Native_Static PROPERTIES OUTPUT_NAME System.Globalization.Native)