[GN] Generation failure caused by trailing space in file name

When I executed gn.py gen out/gn I got the following error:

ERROR at //compiler-rt/lib/builtins/BUILD.gn:162:7: Only source, header, and object files belong in the sources of a static_library. //compiler-rt/lib/builtins/emutls.c  is not one of the valid types.
      "emutls.c ",
      ^----------
See //compiler-rt/lib/BUILD.gn:3:5: which caused the file to be included.
    "//compiler-rt/lib/builtins",
    ^---------------------------
It turns out to be that the latest gn doesn't accept ill-format file name. And the emutls.c above has a trailing space.
Remove the trailing space should work.

Patch By: myhsu
Differential Revision: https://reviews.llvm.org/D63449

llvm-svn: 364162
This commit is contained in:
Petr Hosek 2019-06-23 23:12:10 +00:00
parent fb2bd4a939
commit c6094f0495
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ static_library("builtins") {
if (target_os != "fuchsia") { if (target_os != "fuchsia") {
sources += [ sources += [
"emutls.c ", "emutls.c",
"enable_execute_stack.c", "enable_execute_stack.c",
"eprintf.c", "eprintf.c",
] ]