Don't pass -Wa,-g on clang. clang's integrated assembler does not appear to support debug symbols yet. (And somehow CMake has another statefulness bug that causes this to only manifest on a second run, so the try bots aren't noticing.) Also don't clobber the existing CMAKE_ASM_FLAGS value. Change-Id: Ia04345f0dc2f9833ac13912d761cfab3479c10cd Reviewed-on: https://boringssl-review.googlesource.com/11083 CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt index 662a2c9..7438caf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -37,7 +37,10 @@ endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_CXX_FLAGS} -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${C_CXX_FLAGS} -Wmissing-declarations") - set(CMAKE_ASM_FLAGS "-Wa,-g") + # Clang's integerated assembler does not support debug symbols. + if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,-g") + endif() elseif(MSVC) set(MSVC_DISABLED_WARNINGS_LIST "C4100" # 'exarg' : unreferenced formal parameter