summaryrefslogtreecommitdiff
path: root/src/inc/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2020-04-16Fix PIE options (#26323)submit/tizen/20200415.223728accepted/tizen/unified/20200416.080052Jan Vorlicek1-1/+0
* Fix PIE options We were missing passing the -pie linker option. That means that while we were compiling our code as position independent, the executables (not shared libraries) were not marked as position independent and ASLR was not applied to them. They were always loaded to fixed addresses. This change adds the missing -pie option and also replaces all the individual settings of -fPIE / -fPIC on the targets we build by a centralized setting of CMAKE_POSITION_INDEPENDENT_CODE variable that causes cmake to add the appropriate compiler options everywhere. * Fix native parts of coreclr tests build The native parts of the tests are not built using the root CMakeLists.txt so I am moving enabling the position independent code to configurecompiler.cmake Change-Id: Ieafff8984ec23e5fdb00fb0c2fb017e53afbce88
2019-06-05Use Modern CMake features instead of CMAKE_CXX_FLAGS (#24861)Jeremy Koritzinsky1-1/+1
* Convert C++ standard settings and warning options from CMAKE_<LANG>_FLAGS to Modern CMake isms. * More $<COMPILE_LANGUAGE> generator expressions instead of CMAKE_CXX_FLAGS. * Use $<COMPILE_LANGUAGE:CXX> for all -fpermissive usage * Fix generator expression that generates multiple flags * Fix invalid use of CMAKE_CXX_FLAGS instead of CMAKE_C_FLAGS. * Treat AppleClang as though it is Clang (match pre-3.0 behavior). * Update our build system to understand that AppleClang is distinct from Clang and remove CMP0025 policy setting. * PR Feedback.
2019-03-07Cleanup unused hosting interfaces (#23091)Jan Kotas1-1/+0
2019-02-22More GNUC Fixes (#22687)Sinan Kaya1-0/+5
* Replace __sync_swap with __atomic_exchange_n __sync_swap() is a clang specific function. * Remove multiline comment * Add paranthesis around sum src/md/hotdata/../inc/streamutil.h:73:34: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses] UINT32 aligned = *totalBytes + 3 & ~3; * Define __int64 * Define windows types for tests * Remove undefined has_builtin defines and define alloca and inline for GNUC * Remove __clang__ where possible * Add implicit casting to help compiler find WCHAR* variant src/binder/assembly.cpp:294:73: error: no matching function for call to ‘SString::SString(SString)’ return (pAsmName == nullptr ? nullptr : pAsmName->GetSimpleName()); ^ In file included from src/inc/sstring.h:1082:0, from src/inc/ex.h:19, from src/inc/stgpool.h:28, from src/inc/../md/inc/metamodel.h:18, from src/inc/../md/inc/metamodelro.h:19, from src/inc/metadata.h:17, from src/binder/../vm/util.hpp:19, from src/binder/../vm/common.h:110, from src/binder/assembly.cpp:14: src/inc/sstring.inl:73:8: note: candidate: SString::SString(void*, COUNT_T) inline SString::SString(void *buffer, COUNT_T size) ^ src/inc/sstring.inl:73:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:436:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*, COUNT_T) inline SString::SString(tagLiteral dummytag, const WCHAR *literal, COUNT_T count) ^ src/inc/sstring.inl:436:8: note: candidate expects 3 arguments, 1 provided src/inc/sstring.inl:418:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*) inline SString::SString(tagLiteral dummytag, const WCHAR *literal) ^ src/inc/sstring.inl:418:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:401:8: note: candidate: SString::SString(SString::tagUTF8Literal, const UTF8*) inline SString::SString(tagUTF8Literal dummytag, const UTF8 *literal) ^ src/inc/sstring.inl:401:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:382:8: note: candidate: SString::SString(SString::tagLiteral, const CHAR*) inline SString::SString(tagLiteral dummytag, const ASCII *literal) * Reorder DLLEXPORT and STDAPI GNUC wants extern "C" <attribute> format. * Abstract __FUNCSIG__ * Abstract __debugbreak() * Move common compiler options out of clang and add Wno-unused-value * Add paranthesis around || and && src/gc/gc.cpp:9084:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] (!chosen_power2) && (i < free_space_count)); * Set Wno-delete-non-virtual-dtor for CXX files only * Don't warn on unterminated endif labels * Suppress unused functions * Use 0x syntax rather than h syntax on GNU asm files * Correct constructor call directly src/ToolBox/superpmi/superpmi-shared/logging.cpp:301:27: required from here src/inc/clr_std/string:58:9: error: cannot call constructor ‘std::basic_string<char>::basic_string’ directly this->basic_string::basic_string(_Ptr, c_len(_Ptr)); * Suppress NULL used in arithmetic warnings
2017-10-27Delete dead code (#14703)Jan Kotas1-3/+0
2017-07-05Jitted Code Pitching Feature implementedsergey ignatov1-0/+4
2017-02-12Remove never defined FEATURE_FUSIONdanmosemsft1-1/+0
2016-09-07Fix strict aliasing violation from conditional typedef of wchar_t by ↵kchoi1-5/+4
building entire project as C++ for Unix (#6801) Enable building CoreCLR as C++ project on Unix This series of patches fixes the strict aliasing violation from the conditional typedef of wchar_t in src/pal/inc/pal_char16.h:40 * rename c files to cpp * modify all cmake files to change .c files to .cpp * apply c++ linkage to templates
2016-04-18enable build of cross target components.Rahul Kumar1-3/+3
Currently only enabled for arm64
2016-04-05Add CoreDisTools headerSwaroop Sridhar1-0/+1
CoreCLR uses the CoreDisTools library for utilities like GCStress and SuperPMI. To aid these utilities, this change adds the CoreDisTools header to CoreCLR repository. This cleans up duplication of type/enum definitions in CoreDisTools and CoreCLR sources, and provides for a cleaner way to use the interface. The understanding here is that CoreCLR defines the required CoreDisTools interface, and will publish the header into the cmake-install directory. Any repository can pick up this header and supply implementations for the imported functions. [Currently the only implementation is the one that uses LLVM disassembler in the LLILC tree]. Two other changes: 1) Define TypeDefs for exported function types in cordistools.h to avoid duplicating the signature in importing code. 2) Move to the libcoredistools version 1.0.1, and use the new interface in disassembler.cpp
2016-02-29Export CorJitHost interfaceSwaroop Sridhar1-0/+1
Export the CorJitHost interface to the build directory, so that alternate JITs can use it. This change is necessary to fix LLILC build break.
2016-02-10Fix SOS managed breakpoints when coreclr symbols are stripped.Mike McLaughlin1-0/+1
Added a SOS DAC interface (ISOSDacInterface4::GetClrNotification) to get the exception notification arguments instead of using the GetLastExceptionInformation function from the lldb sosplugin that depends on coreclr symbols being present. On the coreclr side, the clr notification arguments are saved in a global variable that is DAC accessible. A critical section was added to protect this global variable while the special exception is raised. Setting the internal COMPlus_DebugBreakOnAssert environment variable causes 3 or 4 breaks in the debugger with no reason. It was breaking in the function that was determining whether it should break. I was using COMPlus_BreakOnEELoad=2 to break after coreclr was loaded and initialized to set managed breakpoints and on a debug build it generates an assert (on release just a DebugBreak).
2016-02-03cordebuginfo.h out of corinfo.hKyungwoo Lee1-1/+2
ICorDebugInfo is almost standalone data structure. This puts ICorDebugInfo into a new cordebuginfo.h. This new header file is just included in corinfo.h This way we could share this debug data structure with ObjectWriter/LLILC by simply including this header.
2016-01-31Merge pull request #2520 from sperling/profilerJan Kotas1-0/+1
Enabling profiling on Unix/OS X
2016-01-31Enabling profiling on Unix/OS X.Andreas Strid1-0/+1
2016-01-28Support for CFI unwind infoKyungwoo Lee1-1/+2
For Unix targeting CoreRT, this will provide platform specific unwind info which is a dwarf format. Unlike window’s UNWIND_INFO, we won’t encode the format within RyuJit since it is not only complex/error-prone but also needs to be adjusted depending on platforms. Instead, CFI (call frame information) pseudo instructions are encoded, which will be passed to CoreRT/ObjectWriter which will translate them to directly emit CFI directives to LLVM MC stream to establish frames and layout eh_frame section. A jit flag is used to dynamically dispatch either Windows’s unwind blob or this CFI instruction table. No JIT/EE interface change is needed since the API already expects an opaque blob. Initially when I looked at what Clang does, the prologue and the sequence of CFI emissions are a bit different than Windows. Since we will emit the same sequence of code with the same runtime that we define, I assume this is unnecessary – I’ve verified the CFI sequence here can work correctly with libunwind. Basically we need only 3 operations – push reg is a combination of 1 and 2 below. 1. Allocation – increase stack frame. Normally subtract esp in x64. 2. Store – Copy a (callee save) register to stack (memory) 3. SaveFP – Set frame pointer register Since Windows operation is based on the relative value (all offsets, etc are computed from the current point), I also use the similar form of CFI instructions. So, mostly one window’s code corresponds to two CFIs – we might optimize this by aggregating allocation, but I’d like to keep the current syntax/semantic same as Windows. This results in a very simple transformation on par with Windows.
2015-09-09Address code coverage builds feedbackSridhar Periyasamy1-0/+2
- Move the build type check to unix only. - Remove the global fPIC compiler option and add it as compile flags for libcorguids @ src/inc/CMakeLists.txt - Use add_compiler_options instead of add_definitions.
2015-05-05GcInfo: Add support for Standalone buildSwaroop Sridhar1-0/+2
The STANDALONE_BUILD switch can be used to build the GcInfoEncoder library independently by clients outside the CoreClr tree. The GcInfo library uses some custom data-structures (ex: ArrayList) and includes some utility libraries (ex: UtilCode) which pull in several other headers with considerable unrelated content. Rather than porting all the utility code to suite other clients, the STANDALONE_BUILD switch can be used to include only the minimal set of headers specific to GcInfo encodings. Clients of STANDALONE_BUILD will likely use standard library implementations of data-structures like ArrayList, HashMap etc., in place of the custom implementation currently used by GcInfoEncoder. Rather than spew the GcInfoEnoder code with #ifdef STANDALONE_BUILD ... #else .. #endif blocks, we include a special header GcInfoUtil.h in STANDALONE_BUILD mode. GcInfoUtil.h is expected to supply the interface/implementation for the data-structures and utilities used by GcInfoEncoder. This header should be provided by the clients doing the standalone build in their source tree.
2015-04-01Fix next round of warning typesJan Vorlicek1-0/+5
This change fixes the following warnings: 1) Assignment in a condition should be wrapped in () 2) Priority of && / || should be indicated by parentheses. 3) Unknown #pragma optimize ifdefed out for non MSVC 4) Unused functions deleted or put under #ifdef 5) Extra tokens warning disabling moved to the CMakeLists.txt in the src/inc 6) Self assignment of a member or local variable 7) Assigning ~0 to a bitfield member that was just 8 bit wide It also fixes a bug in the STRESS_LOGxx macro invocation in exceptionhandling.cpp and stackwalk.cpp related to recent adding the DBG_ADDR macro usage. This macro expanded a single parameter into two expressions to extract high / low 32 bits separately. But the STRESS_LOGxx parameters are passed to the StressLog::LogMsg method as follows: (void*)(size_t)(data1) That means that the expanded pair x, y would be inserted as data 1 and that leads to ignoring the x due to the comma operator.
2015-03-25Add additional headers to the CoreCLR package to describe its interface.rhadley1-1/+7
Adds headers: - opcode.def and openum.h to describe the MSIL opcodes.
2015-02-09Add new nuget package for development usageMatt Mitchell1-0/+4
Add new nuget package that can be developed against. Also modify the cmake lists of a few directories to add in missing PDBs.
2015-02-07Use list(APPEND) rather than set(var ${var} ...) in CMakeBen Boeckel1-2/+2
This avoids a variable expansion and avoids the chances of a typo being introduced in variable names.
2015-02-07Use foreach(IN LISTS) syntax in CMake codeBen Boeckel1-2/+2
It avoids extra separation on semicolons if there are any and skips a variable expansion.
2015-02-07Remove excess arguments to endfunction() and else()Ben Boeckel1-1/+1
Arguments to else() are always confusing and endfunction only needs to match the first argument.
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+62
[tfs-changeset: 1407945]