-
Notifications
You must be signed in to change notification settings - Fork 64
build: Add ClangCL profiles #791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 10 commits
60e1e5b
114c549
ff5513b
44acfcf
dbff78d
616f7d7
aad8bb1
7b8cb61
062b5ba
39bb3e1
cbb4db1
c1cc48b
16088b9
8f454a9
b4e722a
eda05ee
25e0120
b5d6795
d1bb5c6
a1b9b99
77ed416
a2a7e72
cde9e79
8246891
6e4392e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,11 +63,7 @@ if(WIN32) | |
endif() | ||
endif() | ||
|
||
if(NBL_DYNAMIC_MSVC_RUNTIME) | ||
list(APPEND NBL_DXC_CMAKE_OPTIONS "-DCMAKE_MSVC_RUNTIME_LIBRARY:STATIC=MultiThreaded$<$<CONFIG:Debug>:Debug>DLL") | ||
else() | ||
list(APPEND NBL_DXC_CMAKE_OPTIONS "-DCMAKE_MSVC_RUNTIME_LIBRARY:STATIC=MultiThreaded$<$<CONFIG:Debug>:Debug>") | ||
endif() | ||
list(APPEND NBL_DXC_CMAKE_OPTIONS "-DCMAKE_MSVC_RUNTIME_LIBRARY:STATIC=MultiThreaded$<$<CONFIG:Debug>:Debug>$<$<BOOL:${NBL_COMPILER_DYNAMIC_RUNTIME}>:DLL>") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as with the general nabla comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
# perform DXC compile standard requirement test | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
+2 −2 | include/dxc/Support/dxcapi.use.h | |
+3 −3 | include/llvm/CodeGen/SchedulerRegistry.h | |
+2 −1 | lib/IR/Core.cpp | |
+3 −2 | lib/MSSupport/MSFileSystemImpl.cpp | |
+11 −15 | lib/Support/Windows/RWMutex.inc |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,10 @@ if(MSVC) | |
endif() | ||
|
||
option(NBL_STATIC_BUILD "" OFF) # ON for static builds, OFF for shared | ||
option(NBL_DYNAMIC_MSVC_RUNTIME "" ON) | ||
option(NBL_COMPILER_DYNAMIC_RUNTIME "" ON) | ||
option(NBL_SANITIZE_ADDRESS OFF) | ||
|
||
if(MSVC) | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL MSVC) | ||
if(NBL_SANITIZE_ADDRESS) | ||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>") | ||
else() | ||
|
@@ -35,14 +35,8 @@ endif() | |
if(NBL_STATIC_BUILD) | ||
message(STATUS "Static Nabla build enabled!") | ||
else() | ||
if(MSVC) | ||
if(NBL_DYNAMIC_MSVC_RUNTIME) | ||
message(STATUS "Shared Nabla build enabled!") | ||
else() | ||
message(FATAL_ERROR "Turn NBL_DYNAMIC_MSVC_RUNTIME on! For dynamic Nabla builds dynamic MSVC runtime is mandatory!") | ||
endif() | ||
else() | ||
message(FATAL_ERROR "Nabla can't be built with shared libraries! Please make sure you are targetting Windows OS and MSVC compiler!") | ||
if(NOT NBL_COMPILER_DYNAMIC_RUNTIME) | ||
message(FATAL_ERROR "Turn NBL_COMPILER_DYNAMIC_RUNTIME on! For dynamic Nabla builds dynamic runtime is mandatory!") | ||
endif() | ||
Comment on lines
+37
to
39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aah ok so we want to ban compiling with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes we agreed it must match |
||
endif() | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include_guard(GLOBAL) | ||
|
||
set(LANG CXX) | ||
include("${CMAKE_CURRENT_LIST_DIR}/impl/Clang.cmake") | ||
# append unique CXX options here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include_guard(GLOBAL) | ||
|
||
set(LANG CXX) | ||
include("${CMAKE_CURRENT_LIST_DIR}/impl/MSVC.cmake") | ||
# append unique CXX options here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include_guard(GLOBAL) | ||
|
||
set(LANG C) | ||
include("${CMAKE_CURRENT_LIST_DIR}/impl/Clang.cmake") | ||
# append unique C options here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include_guard(GLOBAL) | ||
|
||
set(LANG C) | ||
include("${CMAKE_CURRENT_LIST_DIR}/impl/MSVC.cmake") | ||
# append unique C options here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK in Clang and GCC there are options about static linking of libstd-c++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes there are and this property has effect only if MSVC ABI is the target