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

Commit cae34e4

Browse files
hoyosjsJan Jahodaivdiazsawtgodbesafern
authored
Create 3.1.17 crossdac merge (#28185)
* Update branding to 3.1.17 (#28173) * Port from 5.0: Fix Position Independent Code in CMake files (#28143) * CoreCLR PR26323 Port: Fix PIE options * Added missing PIE and RELRO compilation flags. * Merged PR 15832: Port from 5.0: Fix Position Independent Code in CMake files (#28143) Port from 5.0: Fix Position Independent Code in CMake files (#28143) * CoreCLR PR26323 Port: Fix PIE options * Added missing PIE and RELRO compilation flags. * Fix System.Globalization.Native build on Big Sur (#28181) * Fix System.Globalization.Native build on Big Sur * Fix build * Add flags for Linux * [release/3.1] Handle Counter Polling Interval of 0 (#28180) * Backport dotnet/runtime#53836 * Fix test build * update test Co-authored-by: Jan Jahoda <jajahoda@microsoft.com> Co-authored-by: Ivan Diaz Sanchez <ivdiazsa@microsoft.com> Co-authored-by: Will Godbe <wigodbe@microsoft.com> Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com> Co-authored-by: John Salem <josalem@microsoft.com>
1 parent 7e3ee69 commit cae34e4

File tree

52 files changed

+178
-164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+178
-164
lines changed

configurecompiler.cmake

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
66
set(CMAKE_CXX_STANDARD 11)
77
set(CMAKE_CXX_STANDARD_REQUIRED ON)
88

9+
# All code we build should be compiled as position independent.
10+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
11+
912
set(CLR_DEFINES_DEBUG_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Checked BUILDENV_CHECKED=1)
1013
set(CLR_DEFINES_CHECKED_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Checked BUILDENV_CHECKED=1)
1114
set(CLR_DEFINES_RELEASE_INIT NDEBUG URTBLDENV_FRIENDLY=Retail)
@@ -409,10 +412,9 @@ elseif (CLR_CMAKE_PLATFORM_UNIX)
409412
endif ()
410413

411414
# -fdata-sections -ffunction-sections: each function has own section instead of one per .o file (needed for --gc-sections)
412-
# -fPIC: enable Position Independent Code normally just for shared libraries but required when linking with address sanitizer
413415
# -O1: optimization level used instead of -O0 to avoid compile error "invalid operand for inline asm constraint"
414-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CLR_SANITIZE_CXX_FLAGS} -fdata-sections -ffunction-sections -fPIC -O1")
415-
set(CMAKE_CXX_FLAGS_CHECKED "${CMAKE_CXX_FLAGS_CHECKED} ${CLR_SANITIZE_CXX_FLAGS} -fdata-sections -ffunction-sections -fPIC -O1")
416+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CLR_SANITIZE_CXX_FLAGS} -fdata-sections -ffunction-sections -O1")
417+
set(CMAKE_CXX_FLAGS_CHECKED "${CMAKE_CXX_FLAGS_CHECKED} ${CLR_SANITIZE_CXX_FLAGS} -fdata-sections -ffunction-sections -O1")
416418

417419
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${CLR_SANITIZE_LINK_FLAGS}")
418420
set(CMAKE_EXE_LINKER_FLAGS_CHECKED "${CMAKE_EXE_LINKER_FLAGS_CHECKED} ${CLR_SANITIZE_LINK_FLAGS}")
@@ -422,6 +424,12 @@ elseif (CLR_CMAKE_PLATFORM_UNIX)
422424
set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "${CMAKE_SHARED_LINKER_FLAGS_CHECKED} ${CLR_SANITIZE_LINK_FLAGS} -Wl,--gc-sections")
423425
endif ()
424426
endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
427+
428+
# This linker option causes executables we build to be marked as containing
429+
# position independent code.
430+
# It is necessary to make ASLR work for executables.
431+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
432+
425433
endif(WIN32)
426434

427435
# CLR_ADDITIONAL_LINKER_FLAGS - used for passing additional arguments to linker
@@ -437,8 +445,8 @@ endif(CLR_CMAKE_PLATFORM_UNIX)
437445

438446
if(CLR_CMAKE_PLATFORM_LINUX)
439447
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack")
440-
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1")
441-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1")
448+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now")
449+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1 -Wl,-z,relro,-z,now")
442450
endif(CLR_CMAKE_PLATFORM_LINUX)
443451
if(CLR_CMAKE_PLATFORM_FREEBSD)
444452
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack")

dir.common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
<PropertyGroup>
6767
<!-- Central place to set the versions of all nuget packages produced in the repo -->
68-
<PackageVersion Condition="'$(PackageVersion)' == ''">3.1.16</PackageVersion>
68+
<PackageVersion Condition="'$(PackageVersion)' == ''">3.1.17</PackageVersion>
6969
<PreReleaseLabel>servicing</PreReleaseLabel>
7070
</PropertyGroup>
7171

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33
<PropertyGroup>
44
<!-- The .NET Core product branding version -->
5-
<ProductVersion>3.1.16</ProductVersion>
5+
<ProductVersion>3.1.17</ProductVersion>
66
<!-- File version numbers -->
77
<MajorVersion>4</MajorVersion>
88
<MinorVersion>7</MinorVersion>

src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/CounterGroup.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,9 @@ private void OnTimer()
240240
lock (s_counterGroupLock)
241241
{
242242
_timeStampSinceCollectionStarted = now;
243-
do
244-
{
245-
_nextPollingTimeStamp += new TimeSpan(0, 0, 0, 0, _pollingIntervalInMilliseconds);
246-
} while (_nextPollingTimeStamp <= now);
243+
TimeSpan delta = now - _nextPollingTimeStamp;
244+
if (delta > TimeSpan.Zero && _pollingIntervalInMilliseconds > 0)
245+
_nextPollingTimeStamp += TimeSpan.FromMilliseconds(_pollingIntervalInMilliseconds * Math.Ceiling(delta.TotalMilliseconds / _pollingIntervalInMilliseconds));
247246
}
248247
}
249248
}

src/binder/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,5 @@ endif(WIN32)
9191
convert_to_absolute_path(BINDER_SOURCES ${BINDER_SOURCES})
9292
convert_to_absolute_path(BINDER_CROSSGEN_SOURCES ${BINDER_CROSSGEN_SOURCES})
9393

94-
if(CLR_CMAKE_PLATFORM_UNIX)
95-
add_compile_options(-fPIC)
96-
endif(CLR_CMAKE_PLATFORM_UNIX)
97-
9894
add_subdirectory(v3binder)
9995
add_subdirectory(v3binder_crossgen)

src/classlibnative/bcltype/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ set(BCLTYPE_SOURCES
1111
variant.cpp
1212
)
1313

14-
if(CLR_CMAKE_PLATFORM_UNIX)
15-
add_compile_options(-fPIC)
16-
endif(CLR_CMAKE_PLATFORM_UNIX)
17-
1814
add_library_clr(bcltype
1915
STATIC
2016
${BCLTYPE_SOURCES}

src/classlibnative/float/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ set(FLOAT_SOURCES
77
floatsingle.cpp
88
)
99

10-
if(CLR_CMAKE_PLATFORM_UNIX)
11-
add_compile_options(-fPIC)
12-
endif(CLR_CMAKE_PLATFORM_UNIX)
13-
1410
add_library_clr(comfloat_wks
1511
STATIC
1612
${FLOAT_SOURCES}

src/coreclr/hosts/osxbundlerun/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ project(osxbundlerun)
22

33
include_directories(../unixcoreruncommon)
44

5-
add_compile_options(-fPIE)
6-
75
set(CORERUN_SOURCES
86
osxbundlerun.cpp
97
)

src/coreclr/hosts/unixcoreconsole/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ project(unixcoreconsole)
22

33
include_directories(../unixcoreruncommon)
44

5-
add_compile_options(-fPIE)
6-
75
set(CORECONSOLE_SOURCES
86
coreconsole.cpp
97
)

src/coreclr/hosts/unixcorerun/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ project(unixcorerun)
22

33
include_directories(../unixcoreruncommon)
44

5-
add_compile_options(-fPIE)
6-
75
set(CORERUN_SOURCES
86
corerun.cpp
97
)

src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
project(unixcoreruncommon)
22

3-
add_compile_options(-fPIC)
4-
53
set(CMAKE_INCLUDE_CURRENT_DIR ON)
64

75
include(configure.cmake)

src/corefx/System.Globalization.Native/CMakeLists.txt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,11 @@ if (NOT CLR_CMAKE_PLATFORM_DARWIN)
2626
return()
2727
endif()
2828
else()
29-
find_library(ICUCORE icucore)
30-
if(ICUI18N STREQUAL ICUCORE-NOTFOUND)
31-
message(FATAL_ERROR "Cannot find libicucore, skipping build for System.Globalization.Native. .NET globalization is not expected to function.")
32-
return()
33-
endif()
34-
35-
add_definitions(-DOSX_ICU_LIBRARY_PATH=\"/usr/lib/libicucore.dylib\")
29+
add_definitions(-DOSX_ICU_LIBRARY_PATH="/usr/lib/libicucore.dylib")
3630
endif()
3731

3832
include(configure.cmake)
3933

40-
add_compile_options(-fPIC)
41-
4234
set(NATIVEGLOBALIZATION_SOURCES
4335
pal_calendarData.c
4436
pal_casing.c

src/corefx/System.Globalization.Native/configure.cmake

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
include(CheckCSourceCompiles)
2-
include(CheckSymbolExists)
1+
if (CLR_CMAKE_PLATFORM_DARWIN)
2+
set(HAVE_SET_MAX_VARIABLE 1)
3+
set(HAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS 1)
4+
else()
5+
include(CheckCSourceCompiles)
6+
include(CheckSymbolExists)
37

4-
set(CMAKE_REQUIRED_INCLUDES ${UTYPES_H} ${ICU_HOMEBREW_INC_PATH})
8+
set(CMAKE_REQUIRED_INCLUDES ${UTYPES_H} ${ICU_HOMEBREW_INC_PATH})
59

6-
CHECK_C_SOURCE_COMPILES("
7-
#include <unicode/udat.h>
8-
int main(void) { enum UDateFormatSymbolType e = UDAT_STANDALONE_SHORTER_WEEKDAYS; }
9-
" HAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS)
10+
CHECK_C_SOURCE_COMPILES("
11+
#include <unicode/udat.h>
12+
int main(void) { enum UDateFormatSymbolType e = UDAT_STANDALONE_SHORTER_WEEKDAYS; }
13+
" HAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS)
1014

11-
if(NOT CLR_CMAKE_PLATFORM_DARWIN)
1215
set(CMAKE_REQUIRED_LIBRARIES ${ICUUC} ${ICUI18N})
13-
else()
14-
set(CMAKE_REQUIRED_LIBRARIES ${ICUCORE})
15-
endif()
1616

17-
check_symbol_exists(
18-
ucol_setMaxVariable
19-
"unicode/ucol.h"
20-
HAVE_SET_MAX_VARIABLE)
17+
check_symbol_exists(
18+
ucol_setMaxVariable
19+
"unicode/ucol.h"
20+
HAVE_SET_MAX_VARIABLE)
2121

22-
unset(CMAKE_REQUIRED_LIBRARIES)
23-
unset(CMAKE_REQUIRED_INCLUDES)
22+
unset(CMAKE_REQUIRED_LIBRARIES)
23+
unset(CMAKE_REQUIRED_INCLUDES)
24+
endif()
2425

2526
configure_file(
2627
${CMAKE_CURRENT_SOURCE_DIR}/config.h.in

src/debug/createdump/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ include_directories(BEFORE ${VM_DIR})
2020

2121
add_definitions(-DPAL_STDCPP_COMPAT)
2222

23-
add_compile_options(-fPIE)
24-
2523
set(CREATEDUMP_SOURCES
2624
createdump.cpp
2725
crashinfo.cpp

src/debug/daccess/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ include_directories(${CLR_DIR}/src/gcdump)
1111

1212
if(CLR_CMAKE_PLATFORM_UNIX)
1313
include_directories(${GENERATED_INCLUDE_DIR})
14-
add_compile_options(-fPIC)
1514
endif(CLR_CMAKE_PLATFORM_UNIX)
1615

1716
set(DACCESS_SOURCES

src/debug/dbgutil/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,4 @@ set(DBGUTIL_SOURCES
99
dbgutil.cpp
1010
)
1111

12-
if(CLR_CMAKE_PLATFORM_UNIX)
13-
add_compile_options(-fPIC)
14-
endif(CLR_CMAKE_PLATFORM_UNIX)
15-
1612
add_library_clr(dbgutil STATIC ${DBGUTIL_SOURCES})

src/debug/debug-pal/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ if(WIN32)
2222
endif(WIN32)
2323

2424
if(CLR_CMAKE_PLATFORM_UNIX)
25-
add_compile_options(-fPIC)
26-
25+
add_definitions(-DFEATURE_PAL)
2726
add_definitions(-DPAL_IMPLEMENTATION)
2827
add_definitions(-D_POSIX_C_SOURCE=200809L)
2928

src/debug/di/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ if(WIN32)
9090
set(CORDBDI_SOURCES_ASM_FILE ${CMAKE_CURRENT_BINARY_DIR}/${name}.obj)
9191
endif()
9292
elseif(CLR_CMAKE_PLATFORM_UNIX)
93-
add_compile_options(-fPIC)
94-
9593
if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_ARM)
9694
set(CORDBDI_SOURCES_ASM_FILE
9795
${ARCH_SOURCES_DIR}/floatconversion.S

src/debug/ee/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ include_directories(BEFORE ${VM_DIR})
66
include_directories(BEFORE ${VM_DIR}/${ARCH_SOURCES_DIR})
77
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
88

9-
if(CLR_CMAKE_PLATFORM_UNIX)
10-
add_compile_options(-fPIC)
11-
endif(CLR_CMAKE_PLATFORM_UNIX)
12-
139
set(CORDBEE_SOURCES_DAC_AND_WKS
1410
controller.cpp
1511
debugger.cpp

src/debug/ee/wks/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ if (WIN32)
5454

5555
else ()
5656

57-
add_compile_options(-fPIC)
58-
5957
if(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_ARM OR CLR_CMAKE_PLATFORM_ARCH_ARM64 OR CLR_CMAKE_PLATFORM_ARCH_I386)
6058
add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S)
6159
else()

src/debug/ildbsymlib/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,5 @@ set( ILDBSYMLIB_SOURCES
1010
symwrite.cpp
1111
)
1212

13-
if(CLR_CMAKE_PLATFORM_UNIX)
14-
add_compile_options(-fPIC)
15-
endif(CLR_CMAKE_PLATFORM_UNIX)
16-
1713
add_library_clr(ildbsymlib ${ILDBSYMLIB_SOURCES})
1814

src/debug/shim/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ if(WIN32)
44
add_definitions(-DHOST_IS_WINDOWS_OS)
55
endif(WIN32)
66

7-
if(CLR_CMAKE_PLATFORM_UNIX)
8-
add_compile_options(-fPIC)
9-
endif(CLR_CMAKE_PLATFORM_UNIX)
10-
117
set(DEBUGSHIM_SOURCES
128
debugshim.cpp
139
)

src/dlls/dbgshim/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ endif(CLR_CMAKE_PLATFORM_DARWIN)
4141
add_library_clr(dbgshim SHARED ${DBGSHIM_SOURCES})
4242

4343
if(CLR_CMAKE_PLATFORM_UNIX)
44-
add_compile_options(-fPIC)
45-
4644
add_custom_target(dbgshim_exports DEPENDS ${EXPORTS_FILE})
4745
add_dependencies(dbgshim dbgshim_exports)
4846

src/dlls/mscordac/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
include(${CLR_DIR}/dac.cmake)
22
add_definitions(-DFEATURE_NO_HOST)
33

4-
if(CLR_CMAKE_PLATFORM_UNIX)
5-
add_compile_options(-fPIC)
6-
endif(CLR_CMAKE_PLATFORM_UNIX)
7-
84
set(CLR_DAC_SOURCES
95
)
106

src/dlls/mscorrc/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ if(WIN32)
99
string(REPLACE "/guard:cf" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
1010
endif(WIN32)
1111

12-
if(CLR_CMAKE_PLATFORM_UNIX)
13-
add_compile_options(-fPIC)
14-
endif(CLR_CMAKE_PLATFORM_UNIX)
15-
1612
add_subdirectory(full)
1713

1814
# Only add the small version of the resources if the platform is Windows.

src/gc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ target_link_libraries(clrgc ${GC_LINK_LIBRARIES})
9797
install_clr(clrgc)
9898

9999
if(CLR_CMAKE_PLATFORM_UNIX)
100-
add_compile_options(-fPIC)
101100
# dprintf causes many warnings (https://github.com/dotnet/coreclr/issues/13367)
102101
add_compile_options(-Wno-format)
103102
endif(CLR_CMAKE_PLATFORM_UNIX)

src/gc/unix/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
set(CMAKE_INCLUDE_CURRENT_DIR ON)
2-
add_compile_options(-fPIC)
32
include_directories("../env")
43

54
include(configure.cmake)

src/gcinfo/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ endif(CLR_CMAKE_TARGET_ARCH_I386)
1616

1717
convert_to_absolute_path(GCINFO_SOURCES ${GCINFO_SOURCES})
1818

19-
if(CLR_CMAKE_PLATFORM_UNIX)
20-
add_compile_options(-fPIC)
21-
endif(CLR_CMAKE_PLATFORM_UNIX)
22-
2319
add_subdirectory(lib)
2420
add_subdirectory(crossgen)
2521

src/ilasm/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ add_definitions(-DFEATURE_CORECLR)
1010
include_directories(.)
1111
include_directories(../ildasm/unixcoreclrloader)
1212

13-
if(CLR_CMAKE_PLATFORM_UNIX)
14-
add_compile_options(-fPIE)
15-
endif(CLR_CMAKE_PLATFORM_UNIX)
16-
1713
set(ILASM_SOURCES
1814
assem.cpp
1915
writer.cpp

src/ildasm/exe/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ add_definitions(-DFEATURE_CORECLR)
1010
include_directories(..)
1111

1212
if(CLR_CMAKE_PLATFORM_UNIX)
13-
add_compile_options(-fPIE)
1413
include_directories(../unixcoreclrloader)
1514
build_resources(${CMAKE_CURRENT_SOURCE_DIR}/../dasm.rc dasm_rc TARGET_CPP_FILE)
1615

src/inc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ foreach(IDL_SOURCE IN LISTS CORGUIDS_IDL_SOURCES)
6262
list(APPEND CORGUIDS_SOURCES ${C_SOURCE})
6363
endforeach(IDL_SOURCE)
6464

65-
add_compile_options(-fPIC)
6665
endif(WIN32)
6766

6867
if(FEATURE_JIT_PITCHING)

src/jit/dll/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ project(ClrJit)
33
set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE)
44

55
if(CLR_CMAKE_PLATFORM_UNIX)
6-
add_compile_options(-fPIC)
7-
86
add_library_clr(clrjit_static
97
STATIC
108
${SHARED_LIB_SOURCES}

0 commit comments

Comments
 (0)