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

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 23 16:12:10 PDT 2019


Author: phosek
Date: Sun Jun 23 16:12:10 2019
New Revision: 364162

URL: http://llvm.org/viewvc/llvm-project?rev=364162&view=rev
Log:
[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

Modified:
    llvm/trunk/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn

Modified: llvm/trunk/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn?rev=364162&r1=364161&r2=364162&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn Sun Jun 23 16:12:10 2019
@@ -159,7 +159,7 @@ static_library("builtins") {
 
   if (target_os != "fuchsia") {
     sources += [
-      "emutls.c ",
+      "emutls.c",
       "enable_execute_stack.c",
       "eprintf.c",
     ]




More information about the llvm-commits mailing list