This is slightly involved, see the comments in the code.
The GN build now builds a functional lld!
Differential D55606
[gn build] Add infrastructure to create symlinks and use it to create lld's symlinks thakis on Dec 12 2018, 10:32 AM. Authored by
Details This is slightly involved, see the comments in the code. The GN build now builds a functional lld!
Diff Detail
Event Timeline
Comment Actions 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) { Comment Actions That looks like the right fix. Looks like I haven't trie d this on Windows in a while :-/ Want to send a patch?
Comment Actions One aspect of this change I'm not super excited about is the fact that it duplicates information from the toolchain, specifically the file extension. What's worse, people can override the output_extension on individual targets. symlink_or_copy would break in those cases (or if we change the default extension e.g. for a new toolchain). Unfortunately, handling this in a proper way is tricky. Changing the link tool to also create symlinks as you mentioned is the only way I could think of that avoids that duplication, but that's pretty ugly. Ideally, we would be able to use a copy target, but even that doesn't work since you still have to specify the source which has the same issue. So this change is LGTM as is, but I think this is something we should maybe raise on gn-dev as this is not the first time it came up. Comment Actions That's a great point, thanks. I added a FIXME to the py script saying that this shouldn't look at the host os but the target os. Comment Actions Norton is an Antivirus, Anti Malware and internet security software that is designed and developed by Symantec. It uses techniques like signature and heuristics to identify the potential virus. In addition, it has more features like email spam filtering and anti-phishing. Norton is next-gen antivirus security software that offers powerful protection for all your PC, Mac, tablets and smartphones. Comment Actions Avast Account is a portal designed to help you manage all your Avast licenses for different products and devices that are registered to one email address. Comment Actions Manually Update Avast Virus Definitions – Avast is a very powerful security service provider whose services are available for all kinds of devices including Windows PC, Mac, and Android Smart devices. You can visit My.Avast.com to check all the services available. Also, Avast also offers a subscription for both personal use and business purposes. Comment Actions my.avast.com - Get Avast Login to My Avast Account at my.avast.com or id.avast.com and Access Avast Services like Avast Login, Sign in, Sign up Here." Comment Actions Kaspersky Total Security Stay Safe Online – Surfing online and using the internet has become a daily need. We use the web for multiple things such as general surfing, education, banking, e-commerce and many more. Comment Actions amazing work done really helped a lot in installing office |