2022-08-26 15:44:59 +00:00
|
|
|
# Copyright 2014 Google LLC. All rights reserved.
|
2014-07-02 16:58:40 +00:00
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file or at
|
|
|
|
# https://developers.google.com/open-source/licenses/bsd
|
|
|
|
#
|
|
|
|
# This file contains common settings for building packager components.
|
|
|
|
|
|
|
|
{
|
|
|
|
'variables': {
|
2017-12-06 23:08:40 +00:00
|
|
|
'variables': {
|
|
|
|
'shaka_code%': 0,
|
2018-08-15 00:21:29 +00:00
|
|
|
# musl is a lightweight C standard library used in Alpine Linux.
|
|
|
|
'musl%': 0,
|
2021-08-13 03:14:43 +00:00
|
|
|
# This is a flag from build/common.gypi to allow linker warnings.
|
|
|
|
# This may be necessary with static_link_binaries=1.
|
|
|
|
'disable_fatal_linker_warnings%': '0',
|
2021-06-16 16:32:26 +00:00
|
|
|
'libpackager_type%': 'static_library',
|
2021-08-13 03:14:43 +00:00
|
|
|
'static_link_binaries%': '0',
|
2017-12-06 23:08:40 +00:00
|
|
|
},
|
2021-06-15 22:34:02 +00:00
|
|
|
|
2017-12-06 23:08:40 +00:00
|
|
|
'shaka_code%': '<(shaka_code)',
|
2018-08-15 00:21:29 +00:00
|
|
|
'musl%': '<(musl)',
|
2021-08-13 03:14:43 +00:00
|
|
|
'disable_fatal_linker_warnings%': '<(disable_fatal_linker_warnings)',
|
2021-06-16 16:32:26 +00:00
|
|
|
'libpackager_type%': '<(libpackager_type)',
|
2021-08-13 03:14:43 +00:00
|
|
|
'static_link_binaries%': '<(static_link_binaries)',
|
2021-06-15 22:34:02 +00:00
|
|
|
|
2017-12-06 23:08:40 +00:00
|
|
|
'conditions': [
|
|
|
|
['shaka_code==1', {
|
|
|
|
# This enable warnings and warnings-as-errors.
|
|
|
|
'chromium_code': 1,
|
|
|
|
}],
|
2021-06-15 22:34:02 +00:00
|
|
|
# These are some Chromium build settings that are normally keyed off of
|
|
|
|
# component=="shared_library". We don't use component=="shared_library"
|
|
|
|
# because it would result in a shared lib for every single component, but
|
|
|
|
# we still need these settings for a shared library build of libpackager
|
|
|
|
# on Windows.
|
|
|
|
['libpackager_type=="shared_library"', {
|
|
|
|
# Make sure we use a dynamic CRT to avoid issues with std::string in
|
|
|
|
# the library API on Windows.
|
|
|
|
'win_release_RuntimeLibrary': '2', # 2 = /MD (nondebug DLL)
|
|
|
|
'win_debug_RuntimeLibrary': '3', # 3 = /MDd (debug DLL)
|
|
|
|
# Skip the Windows allocator shim on Windows. Using this with a shared
|
|
|
|
# library results in build errors.
|
|
|
|
'win_use_allocator_shim': 0,
|
|
|
|
}],
|
2017-12-06 23:08:40 +00:00
|
|
|
],
|
2014-07-02 16:58:40 +00:00
|
|
|
},
|
|
|
|
'target_defaults': {
|
build: Stop using hermetic clang, libc++, etc
This brings our default build config more in line with what is
necessary for some platforms anyway: using the system-installed
toolchain and sysroot to build everything.
We will no longer fetch source or binaries for any specific build
tools, such as libc++, clang, gold, binutils, or valgrind.
The main part of this change is the changing of default gyp settings
in gyp_packager.py. For this, a bug in gyp_packager.py had to be
fixed, in which similar GYP_DEFINE key names (such as clang and
host_clang) would conflict, causing some defaults not to be installed
properly.
In order to enable clang=0 by default, some changes had to be made in
common.gypi:
- compiler macros added to fix a compatibility issue between
Chromium's base/mac/ folder and the actual OSX SDK
- replaced clang_warning_flags variables with standard cflags
settings, plus xcode_settings for OSX
- turned off warnings-as-errors for non-shaka code, rather than
allow-listing specific warning types, since we can't actually fix
those warnings on any platform
- disabled two specific warnings in shaka code, both of which are
caused by headers from our non-shaka dependencies
Also, one warning (missing "override" keyword) has been fixed in
vod_media_info_dump_muxer_listener.h.
Although these changes were done to make building simpler on a wider
array of platforms (arm64, for example), it seems to make the build a
bit faster, too. For me, at least, on my main Linux workstation:
- "gclient sync" now runs 20-30% faster
- "ninja -C out/Release" now runs 5-13% faster
The following environment variables are no longer required:
- DEPOT_TOOLS_WIN_TOOLCHAIN
- MACOSX_DEPLOYMENT_TARGET
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following GYP_DEFINES are no longer required for anyone:
- clang=0
- host_clang=0
- clang_xcode=1
- use_allocator=none
- use_experimental_allocator_shim=0
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following repos are no longer dependencies in gclient:
- binutils
- clang
- gold
- libc++
- libc++abi
- valgrind
The following gclient hooks have been removed:
- clang
- mac_toolchain
- sysroot
Change-Id: Ie94ccbeec722ab73c291cb7df897d20761a09a70
2021-07-28 20:01:19 +00:00
|
|
|
'defines': [
|
2021-08-13 03:14:43 +00:00
|
|
|
# These defines make the contents of base/mac/foundation_util.h compile
|
|
|
|
# against the standard OSX SDK, by renaming Chrome's opaque type and
|
|
|
|
# using the real OSX type. This was not necessary before we switched
|
|
|
|
# away from using hermetic copies of clang and the sysroot to build.
|
build: Stop using hermetic clang, libc++, etc
This brings our default build config more in line with what is
necessary for some platforms anyway: using the system-installed
toolchain and sysroot to build everything.
We will no longer fetch source or binaries for any specific build
tools, such as libc++, clang, gold, binutils, or valgrind.
The main part of this change is the changing of default gyp settings
in gyp_packager.py. For this, a bug in gyp_packager.py had to be
fixed, in which similar GYP_DEFINE key names (such as clang and
host_clang) would conflict, causing some defaults not to be installed
properly.
In order to enable clang=0 by default, some changes had to be made in
common.gypi:
- compiler macros added to fix a compatibility issue between
Chromium's base/mac/ folder and the actual OSX SDK
- replaced clang_warning_flags variables with standard cflags
settings, plus xcode_settings for OSX
- turned off warnings-as-errors for non-shaka code, rather than
allow-listing specific warning types, since we can't actually fix
those warnings on any platform
- disabled two specific warnings in shaka code, both of which are
caused by headers from our non-shaka dependencies
Also, one warning (missing "override" keyword) has been fixed in
vod_media_info_dump_muxer_listener.h.
Although these changes were done to make building simpler on a wider
array of platforms (arm64, for example), it seems to make the build a
bit faster, too. For me, at least, on my main Linux workstation:
- "gclient sync" now runs 20-30% faster
- "ninja -C out/Release" now runs 5-13% faster
The following environment variables are no longer required:
- DEPOT_TOOLS_WIN_TOOLCHAIN
- MACOSX_DEPLOYMENT_TARGET
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following GYP_DEFINES are no longer required for anyone:
- clang=0
- host_clang=0
- clang_xcode=1
- use_allocator=none
- use_experimental_allocator_shim=0
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following repos are no longer dependencies in gclient:
- binutils
- clang
- gold
- libc++
- libc++abi
- valgrind
The following gclient hooks have been removed:
- clang
- mac_toolchain
- sysroot
Change-Id: Ie94ccbeec722ab73c291cb7df897d20761a09a70
2021-07-28 20:01:19 +00:00
|
|
|
'OpaqueSecTrustRef=__SecACL',
|
|
|
|
'OpaqueSecTrustedApplicationRef=__SecTrustedApplication',
|
|
|
|
],
|
2014-07-02 16:58:40 +00:00
|
|
|
'conditions': [
|
2017-12-06 23:08:40 +00:00
|
|
|
['shaka_code==1', {
|
|
|
|
'include_dirs': [
|
|
|
|
'.',
|
|
|
|
'..',
|
2015-07-22 23:40:45 +00:00
|
|
|
],
|
build: Stop using hermetic clang, libc++, etc
This brings our default build config more in line with what is
necessary for some platforms anyway: using the system-installed
toolchain and sysroot to build everything.
We will no longer fetch source or binaries for any specific build
tools, such as libc++, clang, gold, binutils, or valgrind.
The main part of this change is the changing of default gyp settings
in gyp_packager.py. For this, a bug in gyp_packager.py had to be
fixed, in which similar GYP_DEFINE key names (such as clang and
host_clang) would conflict, causing some defaults not to be installed
properly.
In order to enable clang=0 by default, some changes had to be made in
common.gypi:
- compiler macros added to fix a compatibility issue between
Chromium's base/mac/ folder and the actual OSX SDK
- replaced clang_warning_flags variables with standard cflags
settings, plus xcode_settings for OSX
- turned off warnings-as-errors for non-shaka code, rather than
allow-listing specific warning types, since we can't actually fix
those warnings on any platform
- disabled two specific warnings in shaka code, both of which are
caused by headers from our non-shaka dependencies
Also, one warning (missing "override" keyword) has been fixed in
vod_media_info_dump_muxer_listener.h.
Although these changes were done to make building simpler on a wider
array of platforms (arm64, for example), it seems to make the build a
bit faster, too. For me, at least, on my main Linux workstation:
- "gclient sync" now runs 20-30% faster
- "ninja -C out/Release" now runs 5-13% faster
The following environment variables are no longer required:
- DEPOT_TOOLS_WIN_TOOLCHAIN
- MACOSX_DEPLOYMENT_TARGET
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following GYP_DEFINES are no longer required for anyone:
- clang=0
- host_clang=0
- clang_xcode=1
- use_allocator=none
- use_experimental_allocator_shim=0
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following repos are no longer dependencies in gclient:
- binutils
- clang
- gold
- libc++
- libc++abi
- valgrind
The following gclient hooks have been removed:
- clang
- mac_toolchain
- sysroot
Change-Id: Ie94ccbeec722ab73c291cb7df897d20761a09a70
2021-07-28 20:01:19 +00:00
|
|
|
'cflags': [
|
|
|
|
# This is triggered by logging macros.
|
|
|
|
'-Wno-implicit-fallthrough',
|
|
|
|
# Triggered by unit tests, which override things in mocks. gmock
|
|
|
|
# doesn't mark them as override. An upgrade may help. TODO: try
|
|
|
|
# upgrading gmock.
|
|
|
|
'-Wno-inconsistent-missing-override',
|
|
|
|
# Triggered by base/time/time.h when using clang, but NOT on Mac.
|
|
|
|
'-Wno-implicit-const-int-float-conversion',
|
|
|
|
],
|
|
|
|
'xcode_settings': {
|
|
|
|
'WARNING_CFLAGS': [
|
|
|
|
# This is triggered by logging macros.
|
|
|
|
'-Wno-implicit-fallthrough',
|
|
|
|
# Triggered by unit tests, which override things in mocks. gmock
|
|
|
|
# doesn't mark them as override. An upgrade may help. TODO: try
|
|
|
|
# upgrading gmock.
|
|
|
|
'-Wno-inconsistent-missing-override',
|
2018-01-04 06:02:19 +00:00
|
|
|
],
|
|
|
|
},
|
2018-07-04 05:12:37 +00:00
|
|
|
# TODO(kqyang): Fix these msvs warnings.
|
|
|
|
'msvs_disabled_warnings': [
|
|
|
|
4125, # Decimal digit terminates octal escape sequence, e.g. "\709".
|
|
|
|
4819, # The file contains a character that cannot be represented in
|
|
|
|
# the current code page. It typically happens when compiling
|
|
|
|
# the code in CJK environment if there is non-ASCII characters
|
|
|
|
# in the file.
|
2021-06-14 22:31:44 +00:00
|
|
|
4251, # Warnings about private std::string in Status in a shared
|
|
|
|
# library config on Windows.
|
2017-12-06 23:08:40 +00:00
|
|
|
],
|
|
|
|
}, {
|
2018-01-04 06:02:19 +00:00
|
|
|
# We do not have control over non-shaka code. Disable some warnings to
|
|
|
|
# make build pass.
|
build: Stop using hermetic clang, libc++, etc
This brings our default build config more in line with what is
necessary for some platforms anyway: using the system-installed
toolchain and sysroot to build everything.
We will no longer fetch source or binaries for any specific build
tools, such as libc++, clang, gold, binutils, or valgrind.
The main part of this change is the changing of default gyp settings
in gyp_packager.py. For this, a bug in gyp_packager.py had to be
fixed, in which similar GYP_DEFINE key names (such as clang and
host_clang) would conflict, causing some defaults not to be installed
properly.
In order to enable clang=0 by default, some changes had to be made in
common.gypi:
- compiler macros added to fix a compatibility issue between
Chromium's base/mac/ folder and the actual OSX SDK
- replaced clang_warning_flags variables with standard cflags
settings, plus xcode_settings for OSX
- turned off warnings-as-errors for non-shaka code, rather than
allow-listing specific warning types, since we can't actually fix
those warnings on any platform
- disabled two specific warnings in shaka code, both of which are
caused by headers from our non-shaka dependencies
Also, one warning (missing "override" keyword) has been fixed in
vod_media_info_dump_muxer_listener.h.
Although these changes were done to make building simpler on a wider
array of platforms (arm64, for example), it seems to make the build a
bit faster, too. For me, at least, on my main Linux workstation:
- "gclient sync" now runs 20-30% faster
- "ninja -C out/Release" now runs 5-13% faster
The following environment variables are no longer required:
- DEPOT_TOOLS_WIN_TOOLCHAIN
- MACOSX_DEPLOYMENT_TARGET
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following GYP_DEFINES are no longer required for anyone:
- clang=0
- host_clang=0
- clang_xcode=1
- use_allocator=none
- use_experimental_allocator_shim=0
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following repos are no longer dependencies in gclient:
- binutils
- clang
- gold
- libc++
- libc++abi
- valgrind
The following gclient hooks have been removed:
- clang
- mac_toolchain
- sysroot
Change-Id: Ie94ccbeec722ab73c291cb7df897d20761a09a70
2021-07-28 20:01:19 +00:00
|
|
|
'cflags': [
|
|
|
|
'-Wno-error',
|
|
|
|
],
|
2018-01-04 06:02:19 +00:00
|
|
|
'variables': {
|
|
|
|
'clang_warning_flags': [
|
build: Stop using hermetic clang, libc++, etc
This brings our default build config more in line with what is
necessary for some platforms anyway: using the system-installed
toolchain and sysroot to build everything.
We will no longer fetch source or binaries for any specific build
tools, such as libc++, clang, gold, binutils, or valgrind.
The main part of this change is the changing of default gyp settings
in gyp_packager.py. For this, a bug in gyp_packager.py had to be
fixed, in which similar GYP_DEFINE key names (such as clang and
host_clang) would conflict, causing some defaults not to be installed
properly.
In order to enable clang=0 by default, some changes had to be made in
common.gypi:
- compiler macros added to fix a compatibility issue between
Chromium's base/mac/ folder and the actual OSX SDK
- replaced clang_warning_flags variables with standard cflags
settings, plus xcode_settings for OSX
- turned off warnings-as-errors for non-shaka code, rather than
allow-listing specific warning types, since we can't actually fix
those warnings on any platform
- disabled two specific warnings in shaka code, both of which are
caused by headers from our non-shaka dependencies
Also, one warning (missing "override" keyword) has been fixed in
vod_media_info_dump_muxer_listener.h.
Although these changes were done to make building simpler on a wider
array of platforms (arm64, for example), it seems to make the build a
bit faster, too. For me, at least, on my main Linux workstation:
- "gclient sync" now runs 20-30% faster
- "ninja -C out/Release" now runs 5-13% faster
The following environment variables are no longer required:
- DEPOT_TOOLS_WIN_TOOLCHAIN
- MACOSX_DEPLOYMENT_TARGET
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following GYP_DEFINES are no longer required for anyone:
- clang=0
- host_clang=0
- clang_xcode=1
- use_allocator=none
- use_experimental_allocator_shim=0
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following repos are no longer dependencies in gclient:
- binutils
- clang
- gold
- libc++
- libc++abi
- valgrind
The following gclient hooks have been removed:
- clang
- mac_toolchain
- sysroot
Change-Id: Ie94ccbeec722ab73c291cb7df897d20761a09a70
2021-07-28 20:01:19 +00:00
|
|
|
'-Wno-error',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'xcode_settings': {
|
|
|
|
'WARNING_CFLAGS': [
|
|
|
|
'-Wno-error',
|
2018-01-04 06:02:19 +00:00
|
|
|
],
|
|
|
|
},
|
2018-07-04 05:12:37 +00:00
|
|
|
'msvs_disabled_warnings': [
|
|
|
|
4819, # The file contains a character that cannot be represented in
|
|
|
|
# the current code page. It typically happens when compiling
|
|
|
|
# the code in CJK environment if there is non-ASCII characters
|
|
|
|
# in the file.
|
|
|
|
],
|
2016-08-14 22:28:21 +00:00
|
|
|
}],
|
2018-08-15 00:21:29 +00:00
|
|
|
['musl==1', {
|
|
|
|
'defines': [
|
|
|
|
# musl is not uClibc but is similar to uClibc that a minimal feature
|
|
|
|
# set is supported. One of Shaka Packager's dependencies, Chromium
|
|
|
|
# base uses __UCLIBC__ flag to disable some features, which needs to
|
|
|
|
# be disabled for musl too.
|
|
|
|
'__UCLIBC__',
|
|
|
|
],
|
|
|
|
'cflags!': [
|
|
|
|
# Do not treat warnings as errors on musl as there is a hard-coded
|
|
|
|
# warning in musl's sys/errno.h.
|
|
|
|
'-Werror',
|
|
|
|
],
|
build: Stop using hermetic clang, libc++, etc
This brings our default build config more in line with what is
necessary for some platforms anyway: using the system-installed
toolchain and sysroot to build everything.
We will no longer fetch source or binaries for any specific build
tools, such as libc++, clang, gold, binutils, or valgrind.
The main part of this change is the changing of default gyp settings
in gyp_packager.py. For this, a bug in gyp_packager.py had to be
fixed, in which similar GYP_DEFINE key names (such as clang and
host_clang) would conflict, causing some defaults not to be installed
properly.
In order to enable clang=0 by default, some changes had to be made in
common.gypi:
- compiler macros added to fix a compatibility issue between
Chromium's base/mac/ folder and the actual OSX SDK
- replaced clang_warning_flags variables with standard cflags
settings, plus xcode_settings for OSX
- turned off warnings-as-errors for non-shaka code, rather than
allow-listing specific warning types, since we can't actually fix
those warnings on any platform
- disabled two specific warnings in shaka code, both of which are
caused by headers from our non-shaka dependencies
Also, one warning (missing "override" keyword) has been fixed in
vod_media_info_dump_muxer_listener.h.
Although these changes were done to make building simpler on a wider
array of platforms (arm64, for example), it seems to make the build a
bit faster, too. For me, at least, on my main Linux workstation:
- "gclient sync" now runs 20-30% faster
- "ninja -C out/Release" now runs 5-13% faster
The following environment variables are no longer required:
- DEPOT_TOOLS_WIN_TOOLCHAIN
- MACOSX_DEPLOYMENT_TARGET
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following GYP_DEFINES are no longer required for anyone:
- clang=0
- host_clang=0
- clang_xcode=1
- use_allocator=none
- use_experimental_allocator_shim=0
Documentation, Dockerfiles, and GitHub Actions workflows have been
updated to reflect this.
The following repos are no longer dependencies in gclient:
- binutils
- clang
- gold
- libc++
- libc++abi
- valgrind
The following gclient hooks have been removed:
- clang
- mac_toolchain
- sysroot
Change-Id: Ie94ccbeec722ab73c291cb7df897d20761a09a70
2021-07-28 20:01:19 +00:00
|
|
|
}],
|
2021-08-13 03:14:43 +00:00
|
|
|
['static_link_binaries==1', {
|
|
|
|
'conditions': [
|
|
|
|
['OS=="linux"', {
|
|
|
|
'defines': [
|
|
|
|
# Even when we are not using musl or uClibc, pretending to use
|
|
|
|
# uClibc on Linux is the only way to disable certain Chromium
|
|
|
|
# base features, such as hooking into malloc. Hooking into
|
|
|
|
# malloc, in turn, fails when we are linking statically.
|
|
|
|
'__UCLIBC__',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
'ldflags': [
|
|
|
|
'-static',
|
|
|
|
],
|
|
|
|
}],
|
2014-07-02 16:58:40 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
}
|