[all-commits] [llvm/llvm-project] c48974: [libunwind] Set LIBUNWIND_ASM_SOURCES to the ASM s...

James Nagurne via All-commits all-commits at lists.llvm.org
Fri Jan 24 19:16:59 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c48974ffd7d1676f79d39d3b1e70f07d3a5e2e44
      https://github.com/llvm/llvm-project/commit/c48974ffd7d1676f79d39d3b1e70f07d3a5e2e44
  Author: James Nagurne <j-nagurne at ti.com>
  Date:   2020-01-24 (Fri, 24 Jan 2020)

  Changed paths:
    M libunwind/src/CMakeLists.txt

  Log Message:
  -----------
  [libunwind] Set LIBUNWIND_ASM_SOURCES to the ASM source language from C

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.

Patch By: JamesNagurne

Differential Revision: https://reviews.llvm.org/D72952




More information about the All-commits mailing list