[libcxx-commits] [PATCH] D72952: [libunwind] Set LIBUNWIND_ASM_SOURCES to the ASM source language from C

James Nagurne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 17 12:57:03 PST 2020


JamesNagurne created this revision.
Herald added subscribers: libcxx-commits, christof, mgorny.
Herald added a project: libc++.

  I believe this is an oversight from the import of libunwind into its own
  library from libc++abi.
  
  In libc++abi, these files had the .s suffix, which indicates that the file
  is a preprocessed assembly source file. This caused problems because the
  files rely upon preprocessors to guard target-specific blocks.
  
  To fix this, the CMakeLists file marked these files as C so that the
  preprocessor would be run over them, but then the compiler would correctly
  identify the files as assembly and compile them as such.
  
  When imported to libunwind, these files were (correctly) renamed with .S
  suffixes, which are non-preprocessed assembly. Thus, we no longer need the
  C language property.
  
  The benefit here is that the files can now benefit from CMAKE_ASM_FLAGS
  rather than CMAKE_C_FLAGS.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72952

Files:
  libunwind/src/CMakeLists.txt


Index: libunwind/src/CMakeLists.txt
===================================================================
--- libunwind/src/CMakeLists.txt
+++ libunwind/src/CMakeLists.txt
@@ -26,7 +26,7 @@
     )
 set_source_files_properties(${LIBUNWIND_ASM_SOURCES}
                             PROPERTIES
-                              LANGUAGE C)
+                            LANGUAGE ASM)
 
 set(LIBUNWIND_HEADERS
     AddressSpace.hpp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72952.238864.patch
Type: text/x-patch
Size: 422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200117/5aea4881/attachment-0001.bin>


More information about the libcxx-commits mailing list