summaryrefslogtreecommitdiff
path: root/configure.cmake
AgeCommit message (Collapse)AuthorFilesLines
2019-05-07Use -falign-new flag for gcc 7+Adeel1-0/+3
Versions of gcc lower than 7 do not have C++17's "over-aligned new" support. With gcc 7 and 8, following error is thrown: ``` /datadrive/projects/coreclr/src/vm/threadpoolrequest.cpp: In static member function static TPIndex PerAppDomainTPCountList::AddNewTPIndex(): /datadrive/projects/coreclr/src/vm/threadpoolrequest.cpp:79:81: error: new of type ManagedPerAppDomainTPCount with extended alignment 64 [-Werror=aligned-new=] ManagedPerAppDomainTPCount * pAdCount = new ManagedPerAppDomainTPCount(index); ^ /datadrive/projects/coreclr/src/vm/threadpoolrequest.cpp:79:81: note: uses void* operator new(size_t), which does not have an alignment parameter /datadrive/projects/coreclr/src/vm/threadpoolrequest.cpp:79:81: note: use -faligned-new to enable C++17 over-aligned new support ``` The fix is to enable `-falign-new` (without fully activating C++17 features), that does auto-alignment like gcc 6x and below and clang.
2017-03-29Add PGO support for Clang/LLVM on Unix (#10533)Daniel Podder1-0/+12
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.