GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — build: add GN build files by zcbenz · Pull Request #47637 · nodejs/node

build: add GN build files #47637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
nodejs-github-bot merged 1 commit into nodejs:main from zcbenz:patch-gn
Nov 11, 2023

Uh oh!

There was an error while loading. Please reload this page.

Merged

build: add GN build files #47637

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1 commit
Select commit
05799e1
build: add GN build files
zcbenz Apr 17, 2023
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

14 changes: 14 additions & 0 deletions 14 BUILD.gn
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##############################################################################
# #
# DO NOT EDIT THIS FILE! #
# #
##############################################################################

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please modify the gyp files if you are making changes to build system.

import("unofficial.gni")

node_gn_build("node") {
}
14 changes: 14 additions & 0 deletions 14 deps/ada/BUILD.gn
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##############################################################################
# #
# DO NOT EDIT THIS FILE! #
# #
##############################################################################

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please modify the gyp files if you are making changes to build system.

import("unofficial.gni")

ada_gn_build("ada") {
}
29 changes: 29 additions & 0 deletions 29 deps/ada/unofficial.gni
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2023 Microsoft Inc.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please edit the gyp files if you are making changes to build system.

import("../../node.gni")
import("$node_v8_path/gni/v8.gni")

# The actual configurations are put inside a template in unofficial.gni to
# prevent accidental edits from contributors.
template("ada_gn_build") {
config("ada_config") {
include_dirs = [ "." ]
}

gypi_values = exec_script("../../tools/gypi_to_gn.py",
[ rebase_path("ada.gyp") ],
"scope",
[ "ada.gyp" ])

source_set(target_name) {
forward_variables_from(invoker, "*")
public_configs = [ ":ada_config" ]
sources = gypi_values.ada_sources
}
}
14 changes: 14 additions & 0 deletions 14 deps/base64/BUILD.gn
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##############################################################################
# #
# DO NOT EDIT THIS FILE! #
# #
##############################################################################

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please modify the gyp files if you are making changes to build system.

import("unofficial.gni")

base64_gn_build("base64") {
}
141 changes: 141 additions & 0 deletions 141 deps/base64/unofficial.gni
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Copyright (c) 2013-2022 GitHub Inc.
# Copyright 2022 the V8 project authors. All rights reserved.
# Copyright 2023 Microsoft Inc.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please edit the gyp files if you are making changes to build system.

# The actual configurations are put inside a template in unofficial.gni to
# prevent accidental edits from contributors.
template("base64_gn_build") {
config("base64_external_config") {
include_dirs = [ "base64/include" ]
if (!is_component_build) {
defines = [ "BASE64_STATIC_DEFINE" ]
}
}

config("base64_internal_config") {
include_dirs = [ "base64/lib" ]
if (is_component_build) {
defines = [ "BASE64_EXPORTS" ]
} else {
defines = []
}
if (target_cpu == "x86" || target_cpu == "x64") {
defines += [
"HAVE_SSSE3=1",
"HAVE_SSE41=1",
"HAVE_SSE42=1",
"HAVE_AVX=1",
"HAVE_AVX2=1",
]
}
if (target_cpu == "arm") {
defines += [ "HAVE_NEON32=1" ]
}
if (target_cpu == "arm64") {
defines += [ "HAVE_NEON64=1" ]
}
if (is_clang || !is_win) {
cflags_c = [
"-Wno-implicit-fallthrough",
"-Wno-shadow",
"-Wno-unused-but-set-variable",
]
}
}

gypi_values = exec_script("../../tools/gypi_to_gn.py",
[ rebase_path("base64.gyp") ],
"scope",
[ "base64.gyp" ])

component(target_name) {
forward_variables_from(invoker, "*")
configs += [ ":base64_internal_config" ]
public_configs = [ ":base64_external_config" ]
sources = gypi_values.base64_sources_common
deps = [
":base64_ssse3",
":base64_sse41",
":base64_sse42",
":base64_avx",
":base64_avx2",
":base64_neon32",
":base64_neon64",
]
}

source_set("base64_ssse3") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/ssse3/codec.c" ]
if (target_cpu == "x86" || target_cpu == "x64") {
if (is_clang || !is_win) {
cflags_c = [ "-mssse3" ]
}
}
}

source_set("base64_sse41") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/sse41/codec.c" ]
if (target_cpu == "x86" || target_cpu == "x64") {
if (is_clang || !is_win) {
cflags_c = [ "-msse4.1" ]
}
}
}

source_set("base64_sse42") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/sse42/codec.c" ]
if (target_cpu == "x86" || target_cpu == "x64") {
if (is_clang || !is_win) {
cflags_c = [ "-msse4.2" ]
}
}
}

source_set("base64_avx") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/avx/codec.c" ]
if (target_cpu == "x86" || target_cpu == "x64") {
if (is_clang || !is_win) {
cflags_c = [ "-mavx" ]
} else if (is_win) {
cflags_c = [ "/arch:AVX" ]
}
}
}
source_set("base64_avx2") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/avx2/codec.c" ]
if (target_cpu == "x86" || target_cpu == "x64") {
if (is_clang || !is_win) {
cflags_c = [ "-mavx2" ]
} else if (is_win) {
cflags_c = [ "/arch:AVX2" ]
}
}
}

source_set("base64_neon32") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/neon32/codec.c" ]
if (target_cpu == "arm") {
if (is_clang || !is_win) {
cflags_c = [ "-mfpu=neon" ]
}
}
}

source_set("base64_neon64") {
configs += [ ":base64_internal_config" ]
sources = [ "base64/lib/arch/neon64/codec.c" ]
# NEON is required in arm64, so no -mfpu flag is needed
}
}
14 changes: 14 additions & 0 deletions 14 deps/brotli/BUILD.gn
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##############################################################################
# #
# DO NOT EDIT THIS FILE! #
# #
##############################################################################

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please modify the gyp files if you are making changes to build system.

import("unofficial.gni")

brotli_gn_build("brotli") {
}
45 changes: 45 additions & 0 deletions 45 deps/brotli/unofficial.gni
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Copyright 2019 the V8 project authors. All rights reserved.
# Copyright 2023 Microsoft Inc.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please edit the gyp files if you are making changes to build system.

# The actual configurations are put inside a template in unofficial.gni to
# prevent accidental edits from contributors.
template("brotli_gn_build") {
config("brotli_config") {
include_dirs = [ "c/include" ]
}

gypi_values = exec_script("../../tools/gypi_to_gn.py",
[ rebase_path("brotli.gyp") ],
"scope",
[ "brotli.gyp" ])

source_set(target_name) {
forward_variables_from(invoker, "*")
public_configs = [ ":brotli_config" ]
sources = gypi_values.brotli_sources
if (is_linux) {
defines = [ "OS_LINUX" ]
} else if (is_mac) {
defines = [ "OS_MACOSX" ]
} else if (target_os == "freebsd") {
defines = [ "OS_FREEBSD" ]
}
if (!is_win) {
libs = [ "m" ]
}
if (is_clang || !is_win) {
cflags_c = [
"-Wno-implicit-fallthrough",
"-Wno-unreachable-code",
"-Wno-unreachable-code-return",
]
}
}
}
14 changes: 14 additions & 0 deletions 14 deps/cares/BUILD.gn
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##############################################################################
# #
# DO NOT EDIT THIS FILE! #
# #
##############################################################################

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please modify the gyp files if you are making changes to build system.

import("unofficial.gni")

cares_gn_build("cares") {
}
81 changes: 81 additions & 0 deletions 81 deps/cares/unofficial.gni
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright (c) 2013-2019 GitHub Inc.
# Copyright 2019 the V8 project authors. All rights reserved.
# Copyright 2023 Microsoft Inc.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please edit the gyp files if you are making changes to build system.

# The actual configurations are put inside a template in unofficial.gni to
# prevent accidental edits from contributors.
template("cares_gn_build") {
config("cares_config") {
include_dirs = [ "include" ]
if (!is_component_build) {
defines = [ "CARES_STATICLIB" ]
}
}

gypi_values = exec_script("../../tools/gypi_to_gn.py",
[ rebase_path("cares.gyp") ],
"scope",
[ "cares.gyp" ])

component(target_name) {
forward_variables_from(invoker, "*")
public_configs = [ ":cares_config" ]
if (is_component_build) {
defines = [ "CARES_BUILDING_LIBRARY" ]
} else {
defines = []
}
if (is_win) {
defines += [ "CARES_PULL_WS2TCPIP_H=1" ]
}
if (is_posix) {
defines += [
"_DARWIN_USE_64_BIT_INODE=1",
"_LARGEFILE_SOURCE",
"_FILE_OFFSET_BITS=64",
"_GNU_SOURCE",
"HAVE_CONFIG_H",
]
}

include_dirs = [ "src/lib" ]
if (is_win) {
include_dirs += [ "config/win32" ]
} else if (is_linux) {
include_dirs += [ "config/linux" ]
} else if (is_mac) {
include_dirs += [ "config/darwin" ]
}

if (is_win) {
libs = [
"ws2_32.lib",
"iphlpapi.lib",
]
}

sources = gypi_values.cares_sources_common
if (is_win) {
sources += gypi_values.cares_sources_win
}
if (is_linux) {
sources += [ "config/linux/ares_config.h" ]
}
if (is_mac) {
sources += [ "config/darwin/ares_config.h" ]
}

if (is_clang || !is_win) {
cflags_c = [
"-Wno-implicit-fallthrough",
"-Wno-unreachable-code",
]
}
}
}
14 changes: 14 additions & 0 deletions 14 deps/googletest/BUILD.gn
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##############################################################################
# #
# DO NOT EDIT THIS FILE! #
# #
##############################################################################

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please modify the gyp files if you are making changes to build system.

import("unofficial.gni")

googletest_gn_build("googletest") {
}
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.