Releases: cglogic/gn
Releases · cglogic/gn
20240623
Do not cleanup args.gn imports located in the output directory. gn cleanup should keep files that are imported by args.gn and located in the output directory. Change-Id: I98116dd3f57765a5c160d7b82bd8104a747dd469 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/17360 Commit-Queue: Takuto Ikuta <[email protected]> Reviewed-by: Dirk Pranke <[email protected]> Reviewed-by: Takuto Ikuta <[email protected]>
20231101
Optimize base::EscapeJSONString for ASCII inputs. Most of the strings passed to this function are ASCII-only and don't even need escaping. This CL provides fast-paths for these cases. This speeds up the generation of many JSON files written by GN. For example, on a large Fuchsia build plan, this saves about 4 seconds while generating identical JSON outputs: ``` $ hyperfine --runs=5 '/tmp/gn1 gen --ide=json out/default --export-rust-project --export-compile-commands' '/tmp/gn3 gen --ide=json out/default --export-rust-project --export-compile-commands' Benchmark 1: /tmp/gn1 gen --ide=json out/default --export-rust-project --export-compile-commands Time (mean ± σ): 28.883 s ± 0.836 s [User: 117.852 s, System: 42.476 s] Range (min … max): 27.694 s … 29.916 s 5 runs Benchmark 2: /tmp/gn2 gen --ide=json out/default --export-rust-project --export-compile-commands Time (mean ± σ): 24.829 s ± 0.590 s [User: 112.068 s, System: 42.400 s] Range (min … max): 23.879 s … 25.296 s 5 runs Summary '/tmp/gn3 gen --ide=json out/default --export-rust-project --export-compile-commands' ran 1.16 ± 0.04 times faster than '/tmp/gn1 gen --ide=json out/default --export-rust-project --export-compile-commands' ``` Change-Id: I7f678f898a9e7f1d271ef8cb47ea77bb6d22800c Reviewed-on: https://gn-review.googlesource.com/c/gn/+/16040 Commit-Queue: David Turner <[email protected]> Reviewed-by: Takuto Ikuta <[email protected]>
20221119
[xcode] Refer to target by their long name in generate Xcode project According to NinjaBuildWriter::WritePhonyAndAllRules() documentation, gn only generate a phony target with the short target name if it is either an executable or unambiguous. Recently a "chrome" target was added in a third-party repository which broke the compilation of Chrome on iOS from the genrated Xcode project since the "chrome" name was no longer unambiguous. Since the target is a bundle and not an executable, the phony target with the short name was not created. Change the Xcode generator to use the long name for the target for which the phony target is always generated. User don't need to care about collision when using Xcode to build. Bug: chromium/1383100 Change-Id: I5e1b43f4e675cc1967744e80194eb7fe7f8ae310 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/14840 Reviewed-by: David Turner <[email protected]> Reviewed-by: Justin Cohen <[email protected]> Commit-Queue: Sylvain Defresne <[email protected]>
20211218
build/gen.py: Fix regen command arguments generation. The 'regen' rule embedded in the build.ninja generated by the script was missing critical arguments like --use-lto, which caused incremental rebuilds to alter the build configuration, leading to surprises (especially when measuring performance!). This fixes the issue by ensuring that any command-line argument is properly re-created in the regen's command, with proper shell quoting. + Upgrade from optparse to argparse Python module. + Remove obsolete imports Bug: None Change-Id: I8e3a995c0a9c6c46ceeb7878cd1db04674ef02cd Reviewed-on: https://gn-review.googlesource.com/c/gn/+/12640 Reviewed-by: Brett Wilson <[email protected]> Commit-Queue: David Turner <[email protected]>
20210406
Update "help analyze" after a95c8a3ccc7de ...and update reference with `out/gn --markdown help all > docs/reference.md` Change-Id: Ia1546111cf2990ebcf455786251800796921997d Reviewed-on: https://gn-review.googlesource.com/c/gn/+/11360 Reviewed-by: Dirk Pranke <[email protected]> Commit-Queue: Nico Weber <[email protected]>
20200816
Add MSYS as a platform. This adds code to build GN for the MSYS2 platform, NOT mingw, meaning the Cygwin like POSIX layer. Change-Id: I6e26522c465750e67ce3b26fd11c8b02726dabdb Reviewed-on: https://gn-review.googlesource.com/c/gn/+/9660 Reviewed-by: Brett Wilson <[email protected]> Commit-Queue: Brett Wilson <[email protected]>
20200222
WIP: Fix (cross)compile with MinGW Tested on debian with the floowing settings: $ export AR=x86_64-w64-mingw32-ar $ export LD=x86_64-w64-mingw32-g++ $ export CXX=x86_64-w64-mingw32-g++ $ ./build/gen.py --out-path=$PWD/mingw --platform=mingw --host=linux $ ninja -C mingw It compiles fine and most of the tests are working. Sadly it's using some exotic functions that seems to not be implemented in wine and some tests are failing: bogdan@dragon:~/.wine/drive_c/gn$ wine gn_unittests.exe 000b:fixme:winediag:start_process Wine Staging 4.0-rc2 is a testing version containing experimental patches. 000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org. [134/547] SourceDi002a:fixme:nls:CompareStringEx semi-stub behavior for flag(s) 0x10 002a:fixme:file:FindFirstFileExW flags not implemented 0x00000002 002a:fixme:file:FindFirstFileExW flags not implemented 0x00000002 [3002a:fixme:file:FindFirstFileExW flags not implemented 0x00000002 002a:fixme:file:FindFirstFileExW flags not implemented 0x00000002 [414/547] FilesystemUtils.SourceDirForPath *** FAILURE ../src/gn/filesystem_utils_unittest.cc:578: "//baR/" == SourceDirForPath(root, base::FilePath(u"c:/SOURCE\\Foo/baR/")).value() 002a:fixme:file:FindFirstFileExW flags not implemented 0x00000002 002a:fixme:file:FindFirstFileExW flags not implemented 0x00000002 002a:fixme:file:FindFirstFileExW flags not implemented 0x00000002 [438/547] FormatTest.001 *** FAILURE ../src/gn/command_format_unittest.cc:47: base::ReadFileToString( base::FilePath(FILE_PATH_LITERAL("src/gn/ format_test_data/") FILE_PATH_LITERAL("001") FILE_PATH_LITERAL(".gn")), &input) [439/547] FormatTest.002 *** FAILURE ../src/gn/command_format_unittest.cc:48: base::ReadFileToString( base::FilePath(FILE_PATH_LITERAL("src/gn/ format_test_data/") FILE_PATH_LITERAL("002") FILE_PATH_LITERAL(".gn")), &input) continue with tons of same errors, till: [516/547] FormatTest.081 *** FAILURE ../src/gn/command_format_unittest.cc:128: base::ReadFileToString( base::FilePath(FILE_PATH_LITERAL("src/gn/ format_test_data/") FILE_PATH_LITERAL("081") FILE_PATH_LITERAL(".gn")), &input) Change-Id: Ie64d7009a085221967b02b2b8b6f375c7e5b874e Reviewed-on: https://gn-review.googlesource.com/c/gn/+/7360 Commit-Queue: Brett Wilson <[email protected]> Reviewed-by: Brett Wilson <[email protected]>
20190618
Fix build with GCC on FreeBSD Include <limits.h> for visibility of "PATH_MAX". Add FreeBSD to known platforms in "gen.py". Change-Id: Ied0608962b9d044fe4d2f08c4dbd0dea5158ba26 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/5181 Reviewed-by: Nico Weber <[email protected]> Commit-Queue: Nico Weber <[email protected]>