Questions tagged [gn]

For questions related to Google's GN build system.

Google's GN is a meta build system for generating low-level ninja build scripts. The name GN derives from "Generate-Ninja". GN is used by major Google projects such as Chromium, Skia and Fuchsia.

Reference: https://gn.googlesource.com/gn/

96 questions
1
vote
1 answer

BUILD.gn: how to add all .c files in one directory into sources

how to add all .c files in one directory into sources. this is not correct: sources = [ "./fuzz_ioctl.c", "./Secodefuzz/mutators/*.c", "./Secodefuzz/common/*.c" ] There is so many files in Secodefuzz/mutators and Secodefuzz/common. I don't want to…
1
vote
0 answers

chromium build error gn gen out/Default in Ubuntu

When I'm setting up the build I'm getting the error in Ubuntu, I'm pasting my error shown in terminal here (Note: /home/quic/ is my home directory) when i type gn gen out/Default it get the following error `quic@quic:\~/chromium/src$ gn gen…
1
vote
1 answer

Could not find gn executable at: C:\...\buildtools\win\gn.exe

I'm running into the following error: Could not find gn executable at: C:\...\JavaScriptApplications\electron\buildtools\win\gn.exe after running the following gclient command as part of the instructions to build electron from source: gn gen…
flyingfishcattle
  • 1,817
  • 3
  • 14
  • 25
1
vote
0 answers

Unknown function (set_sources_assignment_filter)

I'm attempting to build an older version of Chromium (64.0.3282.123) on Linux. Running gn args out/Default produces the error Generating files... ERROR at //build/config/BUILDCONFIG.gn:495:1: Unknown…
Daniel Walker
  • 6,380
  • 5
  • 22
  • 45
1
vote
1 answer

Build V8 with GN and MinGW

I would like to build a static, monolithic library suitable for embedding via MinGW. This is a multiplatform project and I want to avoid switching my entire toolchain over to MSVC. All answers on StackOverflow, Google Groups and the v8 wiki refer to…
DragonDePlatino
  • 159
  • 1
  • 10
1
vote
0 answers

Building WebRTC in multithreaded DLL on Windows

Straight question about WebRTC compilation on Windows (GN/Ninja): Is there a specific configuration in GN that tells ninja to build WebRTC into DLLs that can be consumed by a MSVC application? Currently I just build them statically, but this is not…
Mauro
  • 11
  • 1
1
vote
0 answers

How to configure GN Ninja files when adding includes in Google Chromium source code?

I'm developing new features for an old version of Google Chrome (71.0.3578.141). In the file src/content/browser/devtools/protocol/page_handler.cc, I need to add the following includes: src/content/browser/devtools/protocol/page_handler.cc: #include…
LGCD
  • 11
  • 1
1
vote
1 answer

Compile GN-based projects with modified compiler flags

The build system that V8 uses is not straightforward. Assume I desired to add -save-temps to the build flags to keep all intermediate files produced during compilation. Where would I specify this information? Do you specify it in a particular…
Melab
  • 2,594
  • 7
  • 30
  • 51
1
vote
1 answer

Understanding the GN build system in Fuchsia OS, what is `build_api_module`?

GN stands for Generate Ninja. It generates ninja files which build things. The main file is BUILD.GN at the root of the fuchsia source tree It contains a lot of build_api_module calls: build_api_module("images") { testonly = true data_keys = […
Rafaelo
  • 33
  • 1
  • 15
1
vote
1 answer

Function Calling Error While linking on WSL

I have a project which is being developed in C++. The Build Files are getting created using GN along with Clang. But the issue is that I am not able to create the executable main from GN. You can see the functions defined below for…
1
vote
0 answers

How to customize Chromium (Windows Platform)

I want to modify and build the Chromium's information on Windows OS. The application's name, author and other: Example: Chromium -> Edge The Chromium Authors -> Microsoft The name of file that generated by build: Example: chrome.exe…
1
vote
0 answers

headless_shell sgementation fault when start running on arm64

when i finished cross-compile chrome for amr64, I found that an error 'Segmentation fault' would be reported after starting chrome. The cross-compile server system version is: Linux version 4.4.0-157-generic (buildd@lgw01-amd64-037) (gcc version…
Bob
  • 11
  • 1
1
vote
2 answers

Chromium Linux ARM Build - How can you reduce the size of the built Chrome binary file?

I have been following the steps detailed in the page below to cross compile and build chromium (v87) for a Linux ARM device: https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md I have successfully built the…
1
vote
1 answer

Passing GN command line arguments to dependant BUILD.gn files

I'm trying to compile WebRTC M85 with OpenSSL and I have to edit some BUILD.gn files to modify hard-coded dependencies to BoringSSL. The command line is something like (simplified) : gn gen "intermediate/" --args="target_cpu=\"x64\"…
SamT
  • 528
  • 4
  • 14
1
vote
1 answer

How to distribute Chromium binary after compiling? Directory has over 39GB

I want to distribute Chromium I just compiled. The problem is, just after compiling, the directory with the binary weights over 39GB! How can I filter only needed for operation files? I think it should be at most about 1GB. I am on Windows, and…
JMKS
  • 117
  • 2
  • 10