Source release 17.1.0
This commit is contained in:
53
platforms/example/environment.py
Normal file
53
platforms/example/environment.py
Normal file
@@ -0,0 +1,53 @@
|
||||
# Copyright 2021 Google LLC. All Rights Reserved. This file and proprietary
|
||||
# source code may only be used and distributed under the Widevine License
|
||||
# Agreement.
|
||||
|
||||
# GYP supports the following environment variables to control the paths to the
|
||||
# toolchain:
|
||||
#
|
||||
# * CC - The C compiler
|
||||
# * CXX - The C++ compiler
|
||||
# * AR - The archive tool
|
||||
# * NM - The symbol name tool
|
||||
# * READELF - The ELF metadata tool
|
||||
#
|
||||
# If any are not specified, they default to the system's installed copy of that
|
||||
# tool.
|
||||
#
|
||||
# Note that overriding the linker is NOT supported. The C or C++ compiler will
|
||||
# always be used as a front-end to the linker.
|
||||
#
|
||||
# Any of these may have "_host" or "_target" appended to indicate that they
|
||||
# should only be used when compiling for the host or for the target when
|
||||
# cross-compiling. If GYP is cross-compiling and a specific "_host" or "_target"
|
||||
# tool is not found, it will fall back to the normal tool. e.g. If there is no
|
||||
# "CC_host", host builds will use "CC".
|
||||
#
|
||||
# It is recommended to always set GYP_CROSSCOMPILE to 1 when cross-compiling.
|
||||
|
||||
# |export_variables| is a dictionary containing the variables to set. Relative
|
||||
# paths are interpreted as being relative to this file.
|
||||
export_variables = {
|
||||
# Although we aren't actually cross-compiling in this build, settings.gypi
|
||||
# relies on the cross-compiler's separation of host and target build
|
||||
# artifacts. By setting this variable, we force GYP to use cross-compilation
|
||||
# mode even though both modes use the same compiler binary.
|
||||
'GYP_CROSSCOMPILE': '1',
|
||||
|
||||
# Typically, you will want to set these to the paths to your system's
|
||||
# toolchain. but for this example, we'll just use the system install of GCC.
|
||||
'CC': 'gcc',
|
||||
'CXX': 'g++',
|
||||
'AR': 'ar',
|
||||
|
||||
# Alternatively, here's how you could use the GCC as the "host" toolchain and
|
||||
# Clang as the "target" toolchain:
|
||||
|
||||
# 'CC_target': 'clang',
|
||||
# 'CXX_target': 'clang++',
|
||||
# 'AR_target': 'llvm-ar',
|
||||
#
|
||||
# 'CC_host': 'gcc',
|
||||
# 'CXX_host': 'g++',
|
||||
# 'AR_host': 'ar',
|
||||
}
|
||||
126
platforms/example/settings.gypi
Normal file
126
platforms/example/settings.gypi
Normal file
@@ -0,0 +1,126 @@
|
||||
# Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
# source code may only be used and distributed under the Widevine License
|
||||
# Agreement.
|
||||
{
|
||||
# Here you can override global gyp variables with platform-specific values.
|
||||
# See cdm/platform_properties.gyp for a complete list of settings you can
|
||||
# override.
|
||||
'variables': {
|
||||
'client_company_name': 'KubrickTech',
|
||||
'client_model_name': 'HAL 9000',
|
||||
'client_model_year': '2001',
|
||||
'client_product_name': 'clarke',
|
||||
'client_device_name': 'HAL',
|
||||
'client_arch_name': 'ARMv7',
|
||||
'client_platform': 'Linux',
|
||||
'client_form_factor': 'TV',
|
||||
'client_version': '1.0.0',
|
||||
|
||||
'asm_target_arch': 'x86-64',
|
||||
}, # end variables
|
||||
|
||||
# Here you can set platform-specific compiler settings.
|
||||
'target_defaults': {
|
||||
# These are flags passed to the compiler for all C & C++ files.
|
||||
'cflags': [
|
||||
'-fPIC',
|
||||
'-fvisibility=hidden',
|
||||
'-fno-common',
|
||||
'-Wno-error',
|
||||
# This flag is not supported on GCC, but Widevine strongly encourages
|
||||
# using it if you are building with Clang.
|
||||
# '-ftrivial-auto-var-init=pattern',
|
||||
],
|
||||
# These are flags passed to the compiler for plain C only.
|
||||
'cflags_c': [
|
||||
# Compile using the C11 standard with POSIX extensions
|
||||
'-std=c11',
|
||||
'-D_POSIX_C_SOURCE=200809L',
|
||||
],
|
||||
# These are flags passed to the compiler for C++ only.
|
||||
'cflags_cc': [
|
||||
# Compile using the C++11 standard.
|
||||
'-std=c++11',
|
||||
# CE CDM does not use exceptions or RTTI.
|
||||
'-fno-exceptions',
|
||||
'-fno-rtti',
|
||||
],
|
||||
# These are flags passed to the linker.
|
||||
'ldflags': [
|
||||
#'-static-libstdc++',
|
||||
],
|
||||
# These are macros set by the compiler.
|
||||
'defines': [
|
||||
#'EXAMPLE_MACRO_WITH_NO_VALUE',
|
||||
#'EXAMPLE_KEY=EXAMPLE_VALUE',
|
||||
],
|
||||
# These are additional include paths to search for headers.
|
||||
'include_dirs': [
|
||||
#'/toolchain/include',
|
||||
],
|
||||
'target_conditions': [
|
||||
# Most of the build output is compiled for the target device, but the
|
||||
# build may also sometimes compile files for the host device. For
|
||||
# instance, if you compile Protobuf from source, the "protoc" compiler
|
||||
# will be compiled for your host machine and used as part of the build
|
||||
# process.
|
||||
#
|
||||
# These conditional blocks let you set compiler flags and other settings
|
||||
# that should only apply on the target or host platforms.
|
||||
['_toolset == "target"', {
|
||||
# These are additional settings specifically for the target toolchain.
|
||||
'cflags': [],
|
||||
'cflags_c': [],
|
||||
'cflags_cc': [],
|
||||
'ldflags': [],
|
||||
'defines': [],
|
||||
'include_dirs': [],
|
||||
}], # end _toolset == "target"
|
||||
['_toolset == "host"', {
|
||||
# These are additional settings specifically for the host toolchain.
|
||||
'cflags': [],
|
||||
'cflags_c': [],
|
||||
'cflags_cc': [],
|
||||
'ldflags': [],
|
||||
'defines': [],
|
||||
'include_dirs': [],
|
||||
}], # end _toolset == "host"
|
||||
], # end target_conditions
|
||||
|
||||
'configurations': {
|
||||
# These are additional settings per build configuration.
|
||||
# You may specify any of the keys above in this section
|
||||
# (cflags, cflags_c, cflags_cc, ldflags, defines, include_dirs).
|
||||
#
|
||||
# You are also not limited to the names "debug" and "release". You may use
|
||||
# any names you like. The configuration will be used if you pass its name
|
||||
# to build.py's "--config" or "-c" flag. However, "debug" and "release"
|
||||
# have convenient shorthand flags. ("--debug"/"-d" and "--release"/"-r")
|
||||
'debug': {
|
||||
'cflags': [
|
||||
'-g3',
|
||||
'-Og',
|
||||
],
|
||||
'defines': [
|
||||
# Widevine strongly recommends defining _DEBUG on debug builds
|
||||
'_DEBUG',
|
||||
'_GLIBCXX_DEBUG',
|
||||
],
|
||||
},
|
||||
'release': {
|
||||
'cflags': [
|
||||
'-O2',
|
||||
'-g0',
|
||||
],
|
||||
'defines': [
|
||||
# Widevine strongly recommends defining NDEBUG on release builds
|
||||
'NDEBUG',
|
||||
],
|
||||
'ldflags': [
|
||||
'-flto',
|
||||
'-s',
|
||||
],
|
||||
},
|
||||
}, # end configurations
|
||||
}, # end target_defaults
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export_variables = {
|
||||
'CC': 'clang',
|
||||
'CXX': 'clang++',
|
||||
'LD': 'clang++',
|
||||
'GYP_CROSSCOMPILE': '1',
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
# Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
# source code may only be used and distributed under the Widevine Master
|
||||
# License Agreement.
|
||||
{
|
||||
# Here you can override global gyp variables with platform-specific values.
|
||||
# See cdm.gyp for a complete list of settings you can override.
|
||||
'variables': {
|
||||
'asm_target_arch': 'x86-64',
|
||||
}, # end variables
|
||||
|
||||
# Here you can set platform-specific compiler settings.
|
||||
'target_defaults': {
|
||||
# These are flags passed to the compiler for all C & C++ files.
|
||||
'cflags': [
|
||||
'-fPIC',
|
||||
'-fvisibility=hidden',
|
||||
'-fno-common',
|
||||
'-Wno-unknown-warning-option',
|
||||
|
||||
# Enable many warnings, and treat warnings as errors. Note that, for
|
||||
# cross-compatibility reasons between GCC and Clang, we cannot just use
|
||||
# -Werror to treat warnings as errors, as GCC has no equivalent of
|
||||
# -Wno-unknown-warning-option.
|
||||
'-Werror=all',
|
||||
'-Werror=extra',
|
||||
'-Werror=unused',
|
||||
'-Werror=format=2',
|
||||
'-Werror=format-nonliteral',
|
||||
'-Werror=format-signedness',
|
||||
'-Werror=cast-align',
|
||||
'-Werror=return-type',
|
||||
'-Werror=shadow',
|
||||
|
||||
'-Wno-unused-parameter', # OEC Ref requires this
|
||||
'-Wno-dangling-else', # Allowed by Google C++ Style
|
||||
],
|
||||
# These are flags passed to the compiler for plain C only.
|
||||
'cflags_c': [
|
||||
# Compile using the C11 standard with POSIX extensions
|
||||
'-std=c11',
|
||||
'-D_POSIX_C_SOURCE=200809L',
|
||||
|
||||
# Enable C-specific warnings
|
||||
'-Wbad-function-cast',
|
||||
'-Wno-error=bad-function-cast',
|
||||
'-Wcast-qual',
|
||||
'-Wno-error=cast-qual',
|
||||
],
|
||||
# These are flags passed to the compiler for C++ only.
|
||||
'cflags_cc': [
|
||||
# Compile using the C++11 standard.
|
||||
'-std=c++11',
|
||||
# CE CDM does not use exceptions, and they are expensive.
|
||||
'-fno-exceptions',
|
||||
|
||||
# Enable C++-specific warnings
|
||||
'-Werror=cast-qual',
|
||||
'-Werror=non-virtual-dtor',
|
||||
'-Werror=strict-null-sentinel',
|
||||
'-Werror=useless-cast',
|
||||
|
||||
# TODO(b/156766290): We cannot enable these until we update to gTest 1.10
|
||||
# and update all our tests to use the new version of MOCK_METHOD that
|
||||
# allows specifying |override|.
|
||||
#
|
||||
#'-Werror=overloaded-virtual',
|
||||
#'-Werror=suggest-override',
|
||||
#'-Werror=zero-as-null-pointer-constant',
|
||||
|
||||
'-Wdeprecated-declarations',
|
||||
'-Wno-error=deprecated-declarations',
|
||||
],
|
||||
|
||||
# These are flags passed to the linker.
|
||||
'ldflags': [
|
||||
],
|
||||
|
||||
# These are macros set by the compiler.
|
||||
'defines': [
|
||||
#'EXAMPLE_MACRO_WITH_NO_VALUE',
|
||||
#'EXAMPLE_KEY=EXAMPLE_VALUE',
|
||||
],
|
||||
|
||||
# These are additional include paths to search for headers.
|
||||
'include_dirs': [
|
||||
#'/usr/local/include',
|
||||
],
|
||||
|
||||
'target_conditions': [
|
||||
['_toolset == "host"', {
|
||||
# These are settings specifically for the host toolchain.
|
||||
# The extra equals sign in the key name instructs gyp to replace
|
||||
# the generic settings above rather than append to them.
|
||||
'cflags=': [],
|
||||
|
||||
'cflags_c=': [],
|
||||
|
||||
'cflags_cc=': [],
|
||||
|
||||
'ldflags=': [],
|
||||
|
||||
'defines=': [],
|
||||
|
||||
'include_dirs=': [],
|
||||
}], # end _toolset == "host" condition
|
||||
], # end target_conditions
|
||||
|
||||
'configurations': {
|
||||
# These are additional settings per build configuration.
|
||||
# You may specify any of the keys above in this section
|
||||
# (cflags, cflags_c, cflags_cc, ldflags, defines, include_dirs).
|
||||
'debug': {
|
||||
'cflags': [
|
||||
'-g3',
|
||||
|
||||
'-fsanitize=address,undefined,float-divide-by-zero,bounds',
|
||||
'-fno-sanitize-recover=address,undefined,float-divide-by-zero,bounds',
|
||||
'-fsanitize-address-use-after-scope',
|
||||
# These are the flags recommended by the Address Sanitizer team when
|
||||
# enabling Address Sanitizer.
|
||||
'-U_FORTIFY_SOURCE',
|
||||
'-O1',
|
||||
'-fno-omit-frame-pointer',
|
||||
'-fno-inline',
|
||||
'-fno-optimize-sibling-calls',
|
||||
],
|
||||
'cflags_cc': [
|
||||
# CE CDM does not use RTTI, but UBSan needs it for its vptr checks
|
||||
'-frtti',
|
||||
],
|
||||
'defines': [
|
||||
'_DEBUG',
|
||||
'_GLIBCXX_DEBUG',
|
||||
],
|
||||
'ldflags': [
|
||||
'-g3',
|
||||
'-fsanitize=address,undefined,float-divide-by-zero,bounds',
|
||||
],
|
||||
},
|
||||
'release': {
|
||||
'cflags': [
|
||||
'-O2',
|
||||
'-g0',
|
||||
],
|
||||
'cflags_cc': [
|
||||
# CE CDM does not use RTTI, and it is expensive.
|
||||
'-fno-rtti',
|
||||
],
|
||||
'ldflags': [
|
||||
'-flto',
|
||||
],
|
||||
'defines': [
|
||||
'NDEBUG',
|
||||
],
|
||||
},
|
||||
}, # end configurations
|
||||
}, # end target_defaults
|
||||
}
|
||||
Reference in New Issue
Block a user