https://git.reactos.org/?p=reactos.git;a=commitdiff;h=83e1afe12a8c8ecf1bda6…
commit 83e1afe12a8c8ecf1bda602c31c29e341b5d3553
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Fri Apr 9 10:09:55 2021 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Fri Apr 9 10:09:55 2021 +0200
[CMAKE] Do not call clang with unsupported arguments
---
sdk/cmake/gcc.cmake | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake
index 9da30e09008..b1d4b95fb14 100644
--- a/sdk/cmake/gcc.cmake
+++ b/sdk/cmake/gcc.cmake
@@ -123,7 +123,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_options(-O2 -DNDEBUG)
else()
if(OPTIMIZE STREQUAL "1")
- add_compile_options(-Os -ftracer)
+ add_compile_options(-Os)
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ add_compile_options(-ftracer)
+ endif()
elseif(OPTIMIZE STREQUAL "2")
add_compile_options(-Os)
elseif(OPTIMIZE STREQUAL "3")
@@ -154,7 +157,9 @@ if(ARCH STREQUAL "i386")
add_compile_options(-momit-leaf-frame-pointer)
endif()
elseif(ARCH STREQUAL "amd64")
- add_compile_options(-mpreferred-stack-boundary=4)
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ add_compile_options(-mpreferred-stack-boundary=4)
+ endif()
add_compile_options(-Wno-error)
endif()