Fixing assembly coverage reporting.
Due to issues with CMake enable_language, we have to delay setting CMAKE_ASM_FLAGS until after enable_language(ASM) has been called. We also need to remove the '.file' macro from x86gas.pl to prevent the filenames from being overridden from those provided by the build system. Change-Id: I436f57ec45e4751714af49e1211a0d7810e4e56a Reviewed-on: https://boringssl-review.googlesource.com/16127 Reviewed-by: Steven Valdez <svaldez@google.com> Commit-Queue: Steven Valdez <svaldez@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
c5f0c16b61
commit
43e5a26b53
@ -41,10 +41,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||||||
endif()
|
endif()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_CXX_FLAGS} -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes")
|
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_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${C_CXX_FLAGS} -Wmissing-declarations")
|
||||||
# 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)
|
elseif(MSVC)
|
||||||
set(MSVC_DISABLED_WARNINGS_LIST
|
set(MSVC_DISABLED_WARNINGS_LIST
|
||||||
"C4061" # enumerator 'identifier' in switch of enum 'enumeration' is not
|
"C4061" # enumerator 'identifier' in switch of enum 'enumeration' is not
|
||||||
|
@ -31,6 +31,11 @@ if(UNIX)
|
|||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack")
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack")
|
||||||
|
|
||||||
|
# Clang's integerated assembler does not support debug symbols.
|
||||||
|
if(NOT CMAKE_ASM_COMPILER_ID MATCHES "Clang")
|
||||||
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,-g")
|
||||||
|
endif()
|
||||||
|
|
||||||
# CMake does not add -isysroot and -arch flags to assembly.
|
# CMake does not add -isysroot and -arch flags to assembly.
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
|
||||||
|
@ -104,7 +104,7 @@ sub ::BC { @_; }
|
|||||||
sub ::DWC { @_; }
|
sub ::DWC { @_; }
|
||||||
|
|
||||||
sub ::file
|
sub ::file
|
||||||
{ push(@out,".file\t\"$_[0].S\"\n.text\n"); }
|
{ push(@out,".text\n"); }
|
||||||
|
|
||||||
sub ::function_begin_B
|
sub ::function_begin_B
|
||||||
{ my $func=shift;
|
{ my $func=shift;
|
||||||
|
Loading…
Reference in New Issue
Block a user