-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #47637 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
- Loading branch information
1 parent
d3870ac
commit 8705058
Showing
36 changed files
with
1,923 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,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") { | ||
} |
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,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") { | ||
} |
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,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 | ||
} | ||
} |
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,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") { | ||
} |
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,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 | ||
} | ||
} |
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,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") { | ||
} |
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,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", | ||
] | ||
} | ||
} | ||
} |
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,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") { | ||
} |
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,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", | ||
] | ||
} | ||
} | ||
} |
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,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") { | ||
} |
Oops, something went wrong.