[PATCH] D55606: [gn build] Add infrastructure to create symlinks and use it to create lld's symlinks

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 12 14:16:54 PST 2018


thakis added a comment.

In D55606#1328694 <https://reviews.llvm.org/D55606#1328694>, @smeenai wrote:

> I started playing with this:
>
>   gn gen --dotfile=llvm/utils/gn/.gn --root=. out/gn
>   ERROR at //llvm/utils/gn/build/BUILD.gn:46:5: Undefined identifier.
>       defines += [
>       ^------
>   See //llvm/utils/gn/build/BUILDCONFIG.gn:6:3: which caused the file to be included.
>     "//llvm/utils/gn/build:compiler_defaults",
>     ^----------------------------------------
>
>
> The following fixed it, though idk if it's the right fix:
>
>   diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn
>   index 0f369ec7395..37aa4311651 100644
>   --- a/llvm/utils/gn/build/BUILD.gn
>   +++ b/llvm/utils/gn/build/BUILD.gn
>   @@ -3,9 +3,11 @@ import("//llvm/utils/gn/build/mac_sdk.gni")
>    import("//llvm/utils/gn/build/toolchain/compiler.gni")
>  
>    config("compiler_defaults") {
>   +  defines = []
>   +
>      # FIXME: Don't define this globally here.
>      if (host_os != "win") {
>   -    defines = [ "LLVM_ON_UNIX" ]
>   +    defines += [ "LLVM_ON_UNIX" ]
>      }
>  
>      if (!llvm_enable_assertions) {
>


That looks like the right fix. Looks like I haven't trie d this on Windows in a while :-/ Want to send a patch?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55606/new/

https://reviews.llvm.org/D55606





More information about the llvm-commits mailing list