]> granicus.if.org Git - llvm/commitdiff
[GN] Generation failure caused by trailing space in file name
authorPetr Hosek <phosek@chromium.org>
Sun, 23 Jun 2019 23:12:10 +0000 (23:12 +0000)
committerPetr Hosek <phosek@chromium.org>
Sun, 23 Jun 2019 23:12:10 +0000 (23:12 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364162 91177308-0d34-0410-b5e6-96231b3b80d8

utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn

index 2841fcac3df4e07495da6e17755cde28338d90d7..53d638619a451da122a5ef87879eaa4bc4ba0c63 100644 (file)
@@ -159,7 +159,7 @@ static_library("builtins") {
 
   if (target_os != "fuchsia") {
     sources += [
-      "emutls.c ",
+      "emutls.c",
       "enable_execute_stack.c",
       "eprintf.c",
     ]