forked from void-linux/void-packages
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/build/gen.py b/build/gen.py | ||
index 9353fb17b1bb..bd0fb4e6ee8c 100755 | ||
--- a/build/gen.py | ||
+++ b/build/gen.py | ||
@@ -338,6 +338,11 @@ def WriteGNNinja(path, platform, host, options): | ||
if options.use_lto: | ||
cflags.extend(['-flto', '-fwhole-program-vtables']) | ||
ldflags.extend(['-flto', '-fwhole-program-vtables']) | ||
+ cflags.append('-flto') | ||
+ ldflags.append('-flto') | ||
+ if "clang" in cxx: | ||
+ cflags.append('-fwhole-program-vtables') | ||
+ ldflags.append('-fwhole-program-vtables') | ||
|
||
cflags.extend([ | ||
'-D_FILE_OFFSET_BITS=64', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Template file for 'gn' | ||
pkgname=gn | ||
version=0.1819.e327ffdc | ||
revision=1 | ||
archs="x86_64 i686" | ||
_commit=e327ffdc503815916db2543ec000226a8df45163 | ||
create_wrksrc=yes | ||
hostmakedepends="clang ninja python" | ||
depends="libglib-devel" | ||
short_desc="Meta-build system that generates build files for Ninja" | ||
maintainer="shizonic <realtiaz@gmail.com>" | ||
license="BSD-2-Clause" | ||
homepage="https://gn.googlesource.com/gn/" | ||
distfiles="https://gn.googlesource.com/gn/+archive/${_commit}.tar.gz" | ||
checksum=adbf1d25252f778f82f49d34e60096d31d5eadd83777d23317ea6dffb0e56ec7 | ||
patch_args="-Np1" | ||
|
||
do_build() { | ||
CFLAGS="${CFLAGS} -pthread" \ | ||
CXXFLAGS="${CXXFLAGS} -pthread" \ | ||
LDFLAGS="${LDFLAGS} -pthread" \ | ||
python build/gen.py \ | ||
--no-last-commit-position \ | ||
--use-lto \ | ||
--no-strip | ||
ninja -C out | ||
} | ||
|
||
do_install() { | ||
vbin out/gn | ||
vdoc docs/* | ||
vlicense LICENSE | ||
} |