summaryrefslogtreecommitdiffstats
path: root/llvm/utils/gn/build
Commit message (Collapse)AuthorAgeFilesLines
* [windows] Add /Gw to compiler flagsNico Weber2020-02-201-0/+1
| | | | | | | | | | | | This is like -fdata-sections, and it's not part of /O2 by default for some reason. In the cmake build, reduces the size of clang.exe from 70,358,016 bytes to 69,982,720 bytes. clang-format.exe goes from 3,703,296 bytes to 3,331,072 bytes. Differential Revision: https://reviews.llvm.org/D74573 (cherry picked from commit 09153ab9d267a86d6e9bce18d5074617de5879a5)
* [gn build] Update console print to match the commit message (NFC)Mehdi Amini2019-12-181-1/+1
|
* Tweak commit message for auto update of gn build scriptMehdi Amini2019-12-181-1/+1
| | | | | Use `[tag]` as a prefix and "port" instead of "merge" to avoid confusing with "git merge".
* gn build: Bump Android API level to 29, and NDK to r21.Peter Collingbourne2019-12-051-1/+1
| | | | | | | These are both necessary in order to use ELF TLS, which is needed by the scudo unit tests. Differential Revision: https://reviews.llvm.org/D71079
* gn build: Add a toggle for building against the commandline tools SDK on macOSNico Weber2019-11-281-3/+14
|
* gn build: set HAVE_VCS_VERSION_INC while building Version.cppNico Weber2019-11-232-2/+63
| | | | | | | | | | And belatedly merge r353268 / r353269. test/Driver/wasm-toolchain-lto.c currently requires getLLVMRevision() to return something non-empty to pass. That's hopefully temporary, but making Version.cpp work is probalby a good idea regardless. (Note its contents will by default usually be out-of-date, because llvm_allow_tardy_revision defaults to false.)
* gn build: Add support for cross-compiling the builtins and profile runtimes ↵Peter Collingbourne2019-10-312-0/+12
| | | | | | for Android aarch64 and arm. Differential Revision: https://reviews.llvm.org/D69681
* gn build: make sync build work with git revs now that svn is goneNico Weber2019-10-221-15/+9
|
* gn build: Build compiler-rt code with -fvisibility=hidden.Peter Collingbourne2019-10-181-0/+1
| | | | | | | | This matches the CMake build. Differential Revision: https://reviews.llvm.org/D69202 llvm-svn: 375299
* gn build: no-op style tweak in sync scriptNico Weber2019-10-071-1/+0
| | | | llvm-svn: 373873
* gn build: make windows build less brokenNico Weber2019-10-061-0/+3
| | | | llvm-svn: 373858
* [gn build] Fix Python DeprecationWarningMarco Antognini2019-09-251-4/+10
| | | | | | | | | | | | | | | Summary: This fixes two issues: - DeprecationWarning: invalid escape sequence \` - ResourceWarning: unclosed file Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67753 llvm-svn: 372876
* gn build: color linker errors when using lldNico Weber2019-08-261-0/+3
| | | | llvm-svn: 369951
* gn build: Make sync script not exit 1 if it writes changesNico Weber2019-08-211-1/+1
| | | | llvm-svn: 369571
* gn build: Pre-merge https://reviews.llvm.org/D66195Nico Weber2019-08-141-1/+1
| | | | llvm-svn: 368840
* gn build: Extract git() and git_out() functions in sync scriptNico Weber2019-08-131-11/+8
| | | | llvm-svn: 368671
* gn build: Give cmake sync script an opt-in --write flagNico Weber2019-08-131-14/+56
| | | | | | Differential Revision: https://reviews.llvm.org/D66101 llvm-svn: 368667
* gn build: Make sync script group output by revisionNico Weber2019-08-131-11/+38
| | | | | | Differential Revision: https://reviews.llvm.org/D66090 llvm-svn: 368665
* gn build: Make builtin library build on macOSNico Weber2019-07-311-0/+2
| | | | | | | | For now, it only builds the x86_64 slice. Differential Revision: https://reviews.llvm.org/D65513 llvm-svn: 367449
* gn build: Set +x on symlink_or_copy.pyNico Weber2019-07-191-0/+0
| | | | llvm-svn: 366576
* gn build: Sort sync script outputNico Weber2019-07-071-2/+2
| | | | llvm-svn: 365278
* [GN] Set exit code to 1 if changes are neededVitaly Buka2019-06-271-2/+12
| | | | llvm-svn: 364582
* gn build: Make it possible to build with coverage informationNico Weber2019-05-291-0/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D62508 llvm-svn: 362018
* gn build: Add check-clangd target after r3359424Nico Weber2019-04-301-3/+3
| | | | | | | | | | | | | r359527 already merged some of that to the GN build, but it was missing some bits as well. The check-clangd target works (at least for now) differently than all the other check-foo targets, see https://reviews.llvm.org/D61187 For that reason, there's no gni file and the generated lit configs are not (yet?) added to llvm-lit/BUILD.gn. llvm-svn: 359570
* [gn] Use label_name rather than target_output_name for objectsPetr Hosek2019-04-291-5/+5
| | | | | | | | | | | | | | Multiple targets in the same output directory can use the same target_output_name. The typical example of that is having a shared and a static library of the same, e.g. libc++.so and libc++.a. When that's the case, the object files produced for each target are going to conflict. Using the label_name avoids this conflict since labels are guaranteed to be unique within a single BUILD.gn file which corresponds to a single output directory. Differential Revision: https://reviews.llvm.org/D60329 llvm-svn: 359494
* [gn] Support dots in CMake paths in the sync scriptPetr Hosek2019-04-191-1/+1
| | | | | | | | Some file paths use dots to pick up sources from parent directories. Differential Revision: https://reviews.llvm.org/D60734 llvm-svn: 358774
* Fixed error message printing in write_cmake_config.pyDmitri Gribenko2019-04-171-1/+4
| | | | | | | | | | | | | | Summary: Previously, write_cmake_config.py would raise an error while printing the error, because `leftovers` in "'\n'.join(leftovers)" is a tuple. Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60766 llvm-svn: 358557
* gn build: Fix Windows builds after r357797Nico Weber2019-04-091-1/+3
| | | | llvm-svn: 358004
* [gn] Support for building compiler-rt builtinsPetr Hosek2019-04-051-2/+2
| | | | | | | | | | | | | | | | This is support for building compiler-rt builtins, The library build should be complete for a subset of supported platforms, but not all CMake options have been replicated in GN. We always use the just built compiler to build all the runtimes, which is equivalent to the CMake runtimes build. This simplifies the build configuration because we don't need to support arbitrary host compiler and can always assume the latest Clang. With GN's toolchain support, this is significantly more efficient than the CMake runtimes build. Differential Revision: https://reviews.llvm.org/D60331 llvm-svn: 357821
* [gn] Rebase paths in symlink_or_copy against root_build_dirPetr Hosek2019-04-051-2/+2
| | | | | | | | | | | We should be always rebasing paths against root_build_dir which is the directory where scripts are run from, not root_out_dir which is the current toolchain directory. The latter can result in invalid paths when the action is being used from a non-default toolchain. Differential Revision: https://reviews.llvm.org/D60330 llvm-svn: 357798
* [gn] Make -no-exceptions flag a configPetr Hosek2019-04-052-1/+5
| | | | | | | | | This allows it to be disabled for targets that need exceptions like libunwind, libc++abi and libc++. Differential Revision: https://reviews.llvm.org/D60328 llvm-svn: 357797
* [gn] Use "$link /lib" for archives instead of lib.exeReid Kleckner2019-04-041-1/+1
| | | | | | | | | | | | | | | | Summary: This avoids the need to talk about lib.exe or llvm-lib.exe and it does the right thing with LLD. Reviewers: thakis Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60155 llvm-svn: 357660
* gn build: Add build files for clangd xpc framework codeNico Weber2019-04-032-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a bit of a larger change since this is the first (and as far as I can tell only) place where the LLVM build produces macOS framework bundles. GN has some built-in support for this, so use that. `gn help create_bundle` has a terse description (but it's a bit outdated: `deps` must be `public_deps` and the conditionals in the example in the help aren't quite right on non-iOS). We need a new 'copy_bundle_data' tool, and since we copy the clangd.xpc bundle as bundle_data into ClangdXPC.framework it needs to be able to handle directories in addition to files. GN also insists we have a compile_xcassets tool even though it's not used. I just made that run `false`. Despite GN's support for bundles, we still need to manually create the expected symlink structure in the .framework bundle. Since this code never runs on Windows, it's safe to create the symlinks before the symlink targets exist, so we can just make the bundle depend on the steps that create the symlinks. For this to work, change the symlink script to create the symlink's containing directory if it doesn't yet exist. I locally verified that CMake and GN build create the same bundle structure. (I noticed that both builds set LC_ID_DYLIB to the pre-copy libClangdXPCLib.dylib name, but that seems to not cause any issues and it happens in the CMake build too.) (Also add an error message to clangd-xpc-test-client for when loading the dylib fails – this was useful while locally debugging this.) Differential Revision: https://reviews.llvm.org/D60130 llvm-svn: 357574
* gn build: Add build files for non-framework xpc clangd bitsNico Weber2019-04-021-2/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D60124 llvm-svn: 357476
* gn build: Add build files for most clang-tools-extra unit testsNico Weber2019-03-311-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D60038 llvm-svn: 357369
* gn build: Add some build files for clangdNico Weber2019-03-281-0/+14
| | | | | | | | | | | | | | Enough to build the clangd binaries, but this is still missing build files for: - fuzzer - indexer - index/dex/dexp - benchmarks - xpc Differential Revision: https://reviews.llvm.org/D59899 llvm-svn: 357182
* gn build: Add 32-bit Linux support.Peter Collingbourne2019-03-061-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D58839 llvm-svn: 355467
* [gn] Add target flags to asmflags.Evgeniy Stepanov2019-02-211-0/+1
| | | | | | | | | | | | Reviewers: pcc, thakis Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58483 llvm-svn: 354618
* [gn build] Separate debug and optimization settingsDavid Major2019-02-122-3/+12
| | | | | | | | | | This patch adds an `is_optimized` variable, orthogonal to `is_debug`, to allow for a gn analogue to `RelWithDebInfo` builds. As part of this we'll want to explicitly enable GC+ICF, for the sake of `is_debug && is_optimized` builds. The flags normally default to true except that if you pass `/DEBUG` they default to false. Differential Revision: https://reviews.llvm.org/D58075 llvm-svn: 353888
* gn build: Fix Python 3 write_vcsrevision script compatibilitySerge Guelton2019-02-051-1/+1
| | | | | | | | | | Trivial fix: decode was not called for all subprocess.check_output calls. Commited on behalf of Andrew Boyarshin Differential Revision: https://reviews.llvm.org/D57505 llvm-svn: 353168
* gn build: Upgrade to NDK r19.Peter Collingbourne2019-02-053-25/+5
| | | | | | | | | | NDK r19 includes a sysroot that can be used directly by the compiler without creating a standalone toolchain, so we just need a handful of flags to point Clang there. Differential Revision: https://reviews.llvm.org/D57733 llvm-svn: 353139
* gn build: Windows: use a more standard format for PDB filenamesDavid Major2019-02-041-7/+13
| | | | | | | | The current build was producing names like llvm-undname.exe.pdb, which looks unusual to me at least. This switches them to the more common llvm-undname.pdb style. Differential Revision: https://reviews.llvm.org/D57613 llvm-svn: 353099
* gn build: Revert r353094 (bad merge)David Major2019-02-041-14/+8
| | | | llvm-svn: 353098
* gn build: Windows: use a more standard format for PDB filenamesDavid Major2019-02-041-8/+14
| | | | | | | | The current build was producing names like llvm-undname.exe.pdb, which looks unusual to me at least. This switches them to the more common llvm-undname.pdb style. Differential Revision: https://reviews.llvm.org/D57613 llvm-svn: 353094
* gn build: Windows: write PDBs when is_debugDavid Major2019-02-041-2/+6
| | | | | | | | | | Without /DEBUG, the /Zi doesn't on its own create PDB files. And since ninja runs multiple compilations in parallel, we need /FS to prevent contention on PDBs. Differential Revision: https://reviews.llvm.org/D57612 llvm-svn: 353093
* gn build: Create regular archives for the sanitizer runtimes.Peter Collingbourne2019-02-013-1/+10
| | | | | | | | | | We'll need to do this eventually if we create an installable package. For now, this lets me use the archives to build Android, whose build system wants to copy the archives to another location. Differential Revision: https://reviews.llvm.org/D57607 llvm-svn: 352907
* gn build: Make cmake sync script work on Windows if git is a bat fileNico Weber2019-01-281-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D57338 llvm-svn: 352419
* gn build: Fix `lld-link: unknown flag: -fuse-ld=lld` warnings on WindowsNico Weber2019-01-282-2/+5
| | | | | | | | | | Fixes a minor regression from r351248. While here, also make it possible to opt out of lld by saying use_lld=false when clang_base_path is set. (use_lld still defaults to true if clang_base_path is set.) llvm-svn: 352415
* gn build: Set is_clang to true in stage2 toolchains.Peter Collingbourne2019-01-251-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D57202 llvm-svn: 352146
* gn build: Build clang with -fno-strict-aliasing, make building with gcc much ↵Nico Weber2019-01-251-5/+23
| | | | | | | | | | | | | quieter - gcc doesn't understand -Wstring-conversion, so pass that only to clang - disable a few gcc warnings that are noisy and also disabled in the cmake build - -Wstrict-aliasing pointed out that the cmake build builds clang with -fno-strict-aliasing, so do that too Differential Revision: https://reviews.llvm.org/D57191 llvm-svn: 352141
OpenPOWER on IntegriCloud