summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2017-09-13Disable PAX mprotect for native executables (#13940)Jan Vorlicek1-0/+5
This change adds marking native executables that coreclr build produces (corerun, coreconsole, crossgen, ilasm, ildasm, crashdump) to using the paxctl tool to allow them running on systems with PAX configured so that creating executable memory mappings by applications is prohibited.
2017-08-22[Local GC] Enable building the GC as a shared library (#13137)Sean Gillespie1-11/+8
* [Local GC] Build the GC using system headers * Disable features to get the GC to build * Get rid of the separate 'GC PAL' build * Remove unused stuff * Don't build gcenv.os.cpp when linking in a standalone gc * Stub out CPUGroupInfo and NumaNodeInfo * Stub out IsGCThread and friends * Build the GC as a shared library :tada: * Build, link, and run! :tada: * Fix standalone GC build break * Fixes where the GC's MethodTable and VM's MethodTable classes disagree * Integrate a standalone GC into the CoreCLR build system (so it gets copied to the output folder). Re-enable some ifdef-ed out includes that are required for a non-standalone build of the GC. * Bring changes to Unix and fix the Unix build. Implement some compiler intrinsic wrappers and alignment functions expected by the GC. * Fix the Windows build * 1. Code review feedback: use standard types for BitScanForward and BitScanForward64 2. Delete FEATURE_COM stuff from the build system, not needed for this PR 3. Fix the Unix build * Fix the Windows x86 build - the _BitScanForward64 intrinsic is not available when targeting 32-bit platforms * Remove a number of things from gcenv.base.h that are not used * Remove a linker workaround now that we are not linking a standalone GC into the runtime * Remove dead code, make the lack of GC_PROFILING for standalone gc not break profiling on the non-standalone build * Code review feedback - use add_library_clr and other cmake-related fixes * Fix include indentation * Remove some extraneous parameters to cmake functions (cmake is remarkably lenient...)
2017-07-17Updates the explicit location for armasmjashoo1-3/+7
2017-06-08Fix linker GUARD option (#11492)Jan Vorlicek1-2/+2
I have found that the /GUARD:CF option set in the root CMakeFiles.txt was not being propagated to the Visual C++ project files generated by cmake because of a wrong casing. The CMakeFiles.txt used /guard:cf but it works correctly only if it is all upper case.
2017-06-06Rename CMAKE_ENABLE_CODE_COVERAGE to CLR_CMAKE_ENABLE_CODE_COVERAGE (#12106)Omair Majid1-1/+1
2017-06-02Add support for not breaking *nix build on warnings (#12039)Omair Majid1-0/+1
Add a build flag to make -Werror optional and let the build continue even in the presence of warnings. This option is very useful for anyone compiling with a different (version of the) compiler. A different (version of the) compiler may produce a different set of warnings and a piece of code that compiles without warnings may emit warnings with a different (version of the) compiler. Resolves https://github.com/dotnet/coreclr/issues/8586
2017-06-01[Local GC] Scaffolding for loading a standalone GC (#11242)Sean Gillespie1-0/+4
* Configure the build system to build a CoreCLR capable of loading a standalone GC * Proto-implementation of dynamic GC loading * Build the GC with the VM's CMakeLists when doing a non-standalone build of the GC * [Local GC] Introduce a new feature define, FEATURE_STANDALONE_GC_ONLY, to be used by the CI to explicitly test local GC dynamic loading code paths * Fix the FEATURE_STANDALONE_GC_ONLY build for unix linkers * Rebase against master * Code review feedback: use the existing Unix exports file
2017-04-18Remove /RELEASE option required for device drivers (#11023)Gaurav Khanna1-1/+0
2017-04-13Reenable incremental linking (#10943)Gaurav Khanna1-5/+0
2017-04-13[ARM32/Linux] Build libcoreclrtraceptprovider.so (#10406)Hyeongseok Oh1-1/+5
* Build libcoreclrtraceptprovider.so for ARM32 and modify cmake - Build libcoreclrtraceptprovider.so for ARM32 - Include libcoreclrtraceptprovider.so in nuget package - Don't build libcoreclrtraceptprovider.so for Tizen: lttng is not supported in Tizen - Exclude packaging libcoreclrtraceptprovider.so based on os-name excluded for tizen * Remove libcoreclrtraceptprovider.so before test for ARM32/Linux Remove libcoreclrtraceptprovider.so before test for ARM32/Linux in CI CI test environment using docker with qemu has some problem to use lttng library
2017-04-13Create ELF core dump on coreclr exceptions and signals. (#10902)Mike McLaughlin1-0/+3
* Create ELF core dump on coreclr exceptions and signals. When coreclr aborts because of a unhandled managed exception or hardware signal, the "createdump" utility is launched if the "COMPlus_DbgEnableMiniDump" environment variable is set to "1". This utility uses the DAC enumerate memory interface to determine what memory regions should be written for the managed state plus all the normal Linux memory regions for the native state like threads, stacks, DSO, etc. There still needs some to configure some of the "policies" like the name/location of the core dump and the type of minidump (MiniDumpNormal, MiniDumpWithFullAuxiliaryState, MiniDumpWithPrivateReadWriteMemory, etc.). Currently only supported on Ubuntu Linux. Make createdump smaller by using PAL in DAC module.
2017-04-04Fix Alpine build break in pipelinewtgodbe1-1/+1
2017-04-04Pass crossbuild and linux-id to CMakeLists.txt using CMake arguments (#10686)Hyeongseok Oh1-10/+7
Remove in CMakeLists.txt 1) read cross-build from environment variable 2) read linux-id from file system Instead, pass cross-build and linux-id from gen-buildsys-clang.sh using cmake arguments
2017-03-29Add PGO support for Clang/LLVM on Unix (#10533)Daniel Podder1-0/+3
Extend PGO support from VC++ on WIN32 to Clang/LLVM on UNIX as well. * Just like on Windows: if profile data is missing, skip enabling PGO (allows non-PGO builds in branches where we don't publish PGO data). * PGO with LTO requires additional dependencies (namely a discoverable `ld.gold` and `LLVMgold.so`). To protect against broken support and keep the build flexible across a wider array of distros, attempt to detect whether PGO compilation would work (using cmake's `try_compile()`), and fall back to a non-PGO/non-LTO build if the test fails.
2017-03-29Fix dependency to coreclr and mscorrc in Linux (#10138)Hyeongseok Oh1-1/+1
* Fix dependency to coreclr and mscorrc in Linux Remove dependency with coreclr in some projects for Linux Recover build mscorrc for cross architecture in Linux * Fix CMakeLists.txt in src/dlls minimize uses of CLR_CROSS_COMPONENTS_BUILD flag in CMakeLists.txt Modify root/CMakeLists.txt to exclude corerun and coreconsole build during cross component build
2017-03-13Build Linux altjit for x86 and amd64 (#10120)Bruce Forstall1-5/+0
Enable Windows hosted, Linux target amd64 altjit With this change, we build a JIT that runs on Windows amd64 and targets Linux amd64, as an altjit named linuxnonjit.dll. This is useful for debugging, or generating asm code or diffs. You can even easily create Windows/non-Windows asm diffs (either to compare the asm, or compare the generated code size). For this to work, the JIT-EE interface method getSystemVAmd64PassStructInRegisterDescriptor() was changed to always be built in, by defining `FEATURE_UNIX_AMD64_STRUCT_PASSING_ITF` in all AMD64 builds. The `_ITF` suffix indicates that this is functionality specific to implementing the JIT-EE interface contract. There were many places in the VM that used this interchangeably with `FEATURE_UNIX_AMD64_STRUCT_PASSING`. Now, `FEATURE_UNIX_AMD64_STRUCT_PASSING` means code in the VM needed to implement this feature, but not required to implement the JIT-EE interface contract. In particular, MethodTables compute and cache the "eightbyte" info of structs when loading a type. This is not done when only `FEATURE_UNIX_AMD64_STRUCT_PASSING_ITF` is set, to avoid altering MethodTable behavior on non-Unix AMD64 builds. Instead, if `getSystemVAmd64PassStructInRegisterDescriptor()` is called on a non-Unix build (by the altjit), the `ClassifyEightBytes()` function is called, and nothing is cached. Hopefully (though it was hard for me to guarantee by observation), calling `ClassifyEightBytes()` does not have any side effects on MethodTables. It doesn't really matter, since if called for altjit, we don't care too much about running. The previously used `PLATFORM_UNIX` define is now insufficient. I introduced the `#define` macros `_HOST_UNIX_` to indicate the JIT being built will run on Unix, and `_TARGET_UNIX_` to indicate the JIT is generating code targeting Unix. Some things were converted to use the `UNIX_AMD64_ABI` define, which makes more sense.
2017-03-07Add scripts for building for arm Android (#9961)Frederik Carlier1-1/+3
* Add scripts for building for arm Android * Use arm soft float for bringup * Use NDK r14 * Set HAVE_PT_REGS to false, as they are not available on Android * _aligned_alloc is not available on clang * Detect Visual C++ instead of clang * Detect Android instead of clang
2017-02-17Synchronous toolchain.cmake files with CoreFX (#9409)Jiyoung Giuliana Yun1-1/+1
Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
2017-02-09[ARM32/Linux] Fix definition and CMake for cross-architecture build (#9262)Hyeongseok Oh1-2/+2
- Fix ABI flag based on target - Exclude corefx for cross-architecture component
2017-01-31Support cross-building CoreCLR for arm64 Android (#9173)Frederik Carlier1-1/+1
* Support cross-building CoreCLR for arm64 Android * Link gcc_s before libunwind
2017-01-23[Local GC] Provide an implementation of GCToOSInterface for Unix-like ↵Sean Gillespie1-0/+8
platforms (#8976) * Add way to build with FEATURE_STANDALONE_GC from build.sh * Make CMake changes to build the GC 'PAL' as its own build target (to avoid -nostdinc). In addition, introduce a "GC PAL" that provides an implementation of GCToOSInterface on Unix-like platforms, for use with FEATURE_STANDALONE_GC.
2016-12-23[Linux] Fix cross-architecture component build configuration for ↵Hyeongseok Oh1-6/+4
ARM32-target (#8687) * fix CMakeLists.txt for palrt * Modify CMakeLists.txt for cross-architecture component configuaration Add coreclrpal project to fix a dependency issue when CMake configuration * Allow only x64-host/arm-target for linux allow x64-host/arm-target only, because pal is not stable for x86 now * Update build.sh delete NumProc=1 (inserted for debugging) * Change x64-host to x86-host for arm-target JIT correctness problem, and fix CMake configuration for x86 in pal * Fix type * Update CMakeLists.txt * fix style * Set x86 when arm-target/x64-host * fix typo
2016-12-18Fixing up the arm subsystem versions (#8676)Peter Marcu1-3/+6
* Adding arm64 and updating default subsystems
2016-12-16Fix buildsystem for linux cross-architecture component build (#8646)Hyeongseok Oh1-38/+53
* Fix buildsystem for linux cross-architecture component build * refactoring build.sh, bug fix and typo fix * Update build.sh
2016-11-22[x86/Linux] fix and add for x86 cmake configuration (#8219)SaeHie Park1-0/+10
This patch will add x86 part for cross build - add x86 in build-rootfs and related cross files - add x86 parts in CMakeLists.txt to pass configuration - add required source files to pass configuration
2016-11-19Fixing arm subsystem version (#8211)Peter Marcu1-1/+6
2016-10-24Add CFG flag to ARM64 buildIan Hays1-4/+2
2016-10-15Few more fixes for WinArm32 CI build.Gaurav Khanna1-2/+9
2016-10-04Add PGO GENPROFILE support to coreclr and clrjit (#7423)Daniel Podder1-0/+5
* Add PGO GENPROFILE support to coreclr and clrjit Update the cmake build system to enable support for Profile Guided Optimization (PGO) on Windows, and enable this feature for two target binaries (coreclr and clrjit). With this change, toggle between instrumented and profile-optimized settings for target binaries by passing pgoinstrument argument to the build.cmd Assume profile-optimized mode by default. Fall back to regular non-PGO optimized builds if profile data is not available.
2016-10-04Add support for Alpine Linux (#7440)Jan Vorlicek1-1/+11
This change enables build of CoreCLR on Alpine Linux. Here is the list of changes: - Disable asserts checking RSP in arbitrary threads against cached stack limit for the respective thread. The stack on Alpine obviously grows over the limit reported by the pthread functions. - Disable using XSTATE. This should be re-enabled after MUSL gets the _xstate, _fpx_sw_bytes and related data structures added to the signal.h header. - Disable setting rlimit of RLIMIT_NOFILE to the max value, since it breaks debugging for some reason. - Add skipping over the hardware signal trampoline in the PAL_VirtualUnwind. While we were not trying to walk over it in a simple case, in a case where an exception was thrown from a catch handler of a hardware exception, we still attempted to walk over it and it fails on Alpine. - Fix detection of Alpine Linux in the PAL's CMakeLists.txt so that it works in Docker containers too. - Modified PAL_VirtualUnwind to make the check for unwinding past the bottom of the stack unconditional. We had a long list of platforms where we were doing this check and it doesn't hurt to do it on platforms where it is not needed. I have done that rather than adding a check for Alpine Linux as another platform that needs it.
2016-08-24Some minor changes.Gaurav Khanna1-3/+5
2016-08-23Initial commit to build Win32 Arm CoreCLRGaurav Khanna1-2/+20
2016-07-06Fix incremental build problem for cross-componentsRahul Kumar1-39/+0
2016-06-29Merge pull request #6041 from adityamandaleeka/fix_strip_logicAditya Mandaleeka1-10/+14
Fix platform logic in symbol stripping code
2016-06-28Fix platform logic in symbol stripping code.Aditya Mandaleeka1-10/+14
2016-06-23Merge pull request #5937 from ellismg/pass-build-id-flag-to-linkerMatt Ellis1-1/+3
Pass --build-id=sha1 to linker explicitly
2016-06-23Scripts: verify compiler definitions of native and managed (#4675)MyungJoo Ham1-0/+2
* Scripts: find out compiler definitions of CMake In order to find mismatch between native and managed, we need to know the list of definitions of native. The copmiler definitions are stored at cmake.definitions This addresses the complaints of #4674 Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> * Scripts: add check-definitions.py scripts/check-definitions.py checks the consistency between the native-build (CMake) compiler definitions and the managed-build (MSBuild/mscorlib) compiler definitions at build-time and prints out potentially dangerous inconsistencies. In order to get the proper results, managed build should be executed after the native build (build.sh will do so if no options such as skipnative or skipmanaged are given.) Fix #4674 Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> * Scripts: allow check-definitions py to ignore the harmless The third argument of check-definitions.py specifies harmless keywords to be suppressed from emitting warning messages. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> * Scripts: add ignored cdefine keywords for warning As an example of how to declare compiler definition keywords that are harmless to be inconsistent between the native and the managed, we have added FEATURE_IMPLICIT_TLS and FEATURE_HIJACK. Developers may add more keywords in System.Private.CoreLib.csproj if the keywords are verified to be harmless; i.e., although the keywords exist in both cmake and clr.coreclr.props, the keywords are NEVER used in either side of the sources or the keywords only happen to have the same name while they denote the completely different semantics and may be disjoint. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-06-22Pass --build-id=sha1 to linker explicitlyMatt Ellis1-1/+3
On some platforms, a build-id was not being added to native artifacts and we would like it to be present. Explicitly pass --build-id=sha1 to the linker. Fixes #5796
2016-04-26This has following changes:Rahul Kumar1-23/+14
1. Update arm64 toolset to latest. 2. Link against ucrt. 3. Fix tls offsets which have changed due to updated toolset 4. Fix source code in decimal.cpp to avoid integer overflow. Result of signed integer overlfow is undefined in C++. 5. Enable build of sos which can be loaded in arm64 windbg 6. Add nop to empty assembly marker methods as new toolset generates invalid .pdata for them.
2016-04-21Adding Versioning to Native components in non-Windows builds. (#4393)Jose Perez Rodriguez1-0/+1
Adding Versioning to Native components in non-Windows builds.
2016-04-18enable build of cross target components.Rahul Kumar1-702/+355
Currently only enabled for arm64
2016-04-18Merge pull request #4247 from leemgs/upstream-cross-toolchain-unify2Jan Kotas1-2/+2
Linux/ARM: Unifying the redundant usages of objcopy
2016-04-18Merge pull request #4312 from mjsabby/muks/enable_rejit_xplatnoahfalk1-5/+3
Enable ReJIT on all platforms
2016-04-18Merge pull request #4394 from gkhanna79/VCRTArm64FixRahul Kumar1-25/+28
Fix Arm64 break
2016-04-18Fix Arm64 breakGaurav Khanna1-25/+28
2016-04-18Merge pull request #4370 from krytarowski/netbsd-support-64Aditya Mandaleeka1-1/+5
Print message about detected NetBSD
2016-04-16Cleanup VCRuntime140.dll dependency from native componentsGaurav Khanna1-3/+21
2016-04-15Print message about detected NetBSDKamil Rytarowski1-1/+5
2016-04-15Merge pull request #4359 from gkhanna79/ROLibFix2Gaurav Khanna1-1/+1
DelayLoadAndFixWinRTInterop
2016-04-15DelayLoadAndFixWinRTInteropGaurav Khanna1-1/+1