From 43f3f953950c4a51208ba96afda6b4fa1d83f5c8 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Sun, 23 Jun 2019 23:12:10 +0000 Subject: [PATCH] [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 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn b/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn index 2841fcac3df..53d638619a4 100644 --- a/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn +++ b/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn @@ -159,7 +159,7 @@ static_library("builtins") { if (target_os != "fuchsia") { sources += [ - "emutls.c ", + "emutls.c", "enable_execute_stack.c", "eprintf.c", ] -- 2.40.0