Fix build failures in MacOS 10.12.6 with XCode 9.0

- Update curl to 7.57.0
- Roll clang, which is needed due to MacOS / XCode update
- Fixes and suppress compilation errors due to clang update

Fixes #285

Change-Id: Ibac3288c641861605c3c0500d34d27373e6eecfe
This commit is contained in:
KongQun Yang 2018-01-03 22:02:19 -08:00
parent c88fe54553
commit 5f48cbb0c1
9 changed files with 46 additions and 22 deletions

5
DEPS
View File

@ -39,7 +39,7 @@ deps = {
Var("github") + "/google/boringssl@fc9c67599d9bdeb2e0467085133b81a8e28f77a4", Var("github") + "/google/boringssl@fc9c67599d9bdeb2e0467085133b81a8e28f77a4",
"src/packager/third_party/curl/source": "src/packager/third_party/curl/source":
Var("github") + "/curl/curl@c514af5a4f5ac3ce724065cc6a8e009373436f78", #7.56.1 Var("github") + "/curl/curl@62c07b5743490ce373910f469abc8cdc759bec2b", #7.57.0
"src/packager/third_party/gflags/src": "src/packager/third_party/gflags/src":
Var("chromium_git") + "/external/github.com/gflags/gflags@03bebcb065c83beff83d50ae025a55a4bf94dfca", Var("chromium_git") + "/external/github.com/gflags/gflags@03bebcb065c83beff83d50ae025a55a4bf94dfca",
@ -61,7 +61,7 @@ deps = {
Var("chromium_git") + "/chromium/src/third_party/zlib@830b5c25b5fbe37e032ea09dd011d57042dd94df", #408157 Var("chromium_git") + "/chromium/src/third_party/zlib@830b5c25b5fbe37e032ea09dd011d57042dd94df", #408157
"src/packager/tools/clang": "src/packager/tools/clang":
Var("chromium_git") + "/chromium/src/tools/clang@0b06ba9e49a0cba97f6accd71a974c1623d69e16", #409802 Var("chromium_git") + "/chromium/src/tools/clang@723b25997f0aab45fe1776a0f74a14782e350f8f", #513983
"src/packager/tools/gyp": "src/packager/tools/gyp":
Var("chromium_git") + "/external/gyp@e7079f0e0e14108ab0dba58728ff219637458563", Var("chromium_git") + "/external/gyp@e7079f0e0e14108ab0dba58728ff219637458563",
@ -109,7 +109,6 @@ hooks = [
}, },
{ {
# Pull clang if needed or requested via GYP_DEFINES (GYP_DEFINES="clang=1"). # Pull clang if needed or requested via GYP_DEFINES (GYP_DEFINES="clang=1").
# Note: On Win, this should run after win_toolchain, as it may use it.
"name": "clang", "name": "clang",
"pattern": ".", "pattern": ".",
"action": ["python", "src/packager/tools/clang/scripts/update.py", "--if-needed"], "action": ["python", "src/packager/tools/clang/scripts/update.py", "--if-needed"],

View File

@ -21,6 +21,7 @@ install:
before_build: before_build:
- cd .. - cd ..
- depot_tools\gclient config https://github.com/google/shaka-packager.git --name=src --unmanaged - depot_tools\gclient config https://github.com/google/shaka-packager.git --name=src --unmanaged
- set DEPOT_TOOLS_WIN_TOOLCHAIN=0
- set GYP_DEFINES="target_arch=%PLATFORM% libpackager_type=%LIBPACKAGER_TYPE%" - set GYP_DEFINES="target_arch=%PLATFORM% libpackager_type=%LIBPACKAGER_TYPE%"
- depot_tools\gclient sync - depot_tools\gclient sync
- if [%PLATFORM%] == [x64] ( - if [%PLATFORM%] == [x64] (

View File

@ -18,6 +18,10 @@ python %PACKAGERDIR%\kokoro\deps_replacer.py "https://github.com" "https://githu
cd %PACKAGERDIR%\.. cd %PACKAGERDIR%\..
:: Disable downloading google-internal version of WIN TOOLCHAIN. Use locally
:: installed version instead.
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
:: Note that gclient file is a batch script, so 'call' must be used to wait for :: Note that gclient file is a batch script, so 'call' must be used to wait for
:: the result. :: the result.
:: Also gclient turns off echo, so echo is re-enabled after the command. :: Also gclient turns off echo, so echo is re-enabled after the command.

View File

@ -27,22 +27,22 @@
'.', '.',
'..', '..',
], ],
'conditions': [ 'variables': {
['clang==1', { 'clang_warning_flags': [
'cflags': [ '-Wimplicit-fallthrough',
'-Wimplicit-fallthrough', ],
], # Revert the relevant settings in Chromium's common.gypi.
# Revert the relevant settings in Chromium's common.gypi. 'clang_warning_flags_unset': [
'cflags!': [ '-Wno-char-subscripts',
'-Wno-char-subscripts', '-Wno-unneeded-internal-declaration',
'-Wno-unneeded-internal-declaration', '-Wno-covered-switch-default',
'-Wno-covered-switch-default',
# C++11-related flags: # C++11-related flags:
'-Wno-c++11-narrowing', '-Wno-c++11-narrowing',
'-Wno-reserved-user-defined-literal', '-Wno-reserved-user-defined-literal',
], ],
}], },
'conditions': [
['OS == "win"', { ['OS == "win"', {
'msvs_settings': { 'msvs_settings': {
'VCCLCompilerTool': { 'VCCLCompilerTool': {
@ -53,9 +53,15 @@
}], }],
], ],
}, { }, {
# We do not have control over non-shaka code. Disable some warnings to
# make build pass.
'variables': {
'clang_warning_flags': [
'-Wno-tautological-constant-compare',
'-Wno-unguarded-availability',
],
},
'conditions': [ 'conditions': [
# We do not have control over non-shaka code. Disable some warnings to
# make build pass.
['clang==0', { ['clang==0', {
'cflags': [ 'cflags': [
'-Wno-dangling-else', '-Wno-dangling-else',

View File

@ -18,6 +18,8 @@ namespace media {
class DisplayAction { class DisplayAction {
public: public:
DisplayAction(uint64_t id, uint64_t time) : id_(id), time_(time) {} DisplayAction(uint64_t id, uint64_t time) : id_(id), time_(time) {}
virtual ~DisplayAction() = default;
uint64_t id() const { return id_; } uint64_t id() const { return id_; }
uint64_t time() const { return time_; } uint64_t time() const { return time_; }
virtual void ActOn(std::list<const TextSample*>* display) const = 0; virtual void ActOn(std::list<const TextSample*>* display) const = 0;

View File

@ -29,6 +29,8 @@ class XmlNode;
/// AdaptationSets. /// AdaptationSets.
class Period { class Period {
public: public:
virtual ~Period() = default;
/// Check the existing AdaptationSets, if there is one matching the provided /// Check the existing AdaptationSets, if there is one matching the provided
/// @a media_info, return it; otherwise a new AdaptationSet is created and /// @a media_info, return it; otherwise a new AdaptationSet is created and
/// returned. /// returned.

View File

@ -162,12 +162,12 @@
'source/lib/hmac.c', 'source/lib/hmac.c',
'source/lib/hostasyn.c', 'source/lib/hostasyn.c',
'source/lib/hostcheck.c', 'source/lib/hostcheck.c',
'source/lib/hostip.c',
'source/lib/hostip4.c', 'source/lib/hostip4.c',
'source/lib/hostip6.c', 'source/lib/hostip6.c',
'source/lib/hostip.c',
'source/lib/hostsyn.c', 'source/lib/hostsyn.c',
'source/lib/http2.c',
'source/lib/http.c', 'source/lib/http.c',
'source/lib/http2.c',
'source/lib/http_chunks.c', 'source/lib/http_chunks.c',
'source/lib/http_digest.c', 'source/lib/http_digest.c',
'source/lib/http_negotiate.c', 'source/lib/http_negotiate.c',
@ -203,6 +203,8 @@
'source/lib/security.c', 'source/lib/security.c',
'source/lib/select.c', 'source/lib/select.c',
'source/lib/sendf.c', 'source/lib/sendf.c',
'source/lib/setopt.c',
'source/lib/sha256.c',
'source/lib/share.c', 'source/lib/share.c',
'source/lib/slist.c', 'source/lib/slist.c',
'source/lib/smb.c', 'source/lib/smb.c',

View File

@ -220,6 +220,8 @@
# trio_is_special_quantity and trio_is_negative are only # trio_is_special_quantity and trio_is_negative are only
# used with certain preprocessor defines set. # used with certain preprocessor defines set.
'-Wno-unused-function', '-Wno-unused-function',
# Comparison between xmlElementType and xmlXPathTypeVal.
'-Wno-enum-compare',
], ],
}, },
'include_dirs': [ 'include_dirs': [

View File

@ -46,6 +46,8 @@
'clang_warning_flags': [ 'clang_warning_flags': [
# protobuf-3 contains a few functions that are unused. # protobuf-3 contains a few functions that are unused.
'-Wno-unused-function', '-Wno-unused-function',
'-Wno-enum-compare',
'-Wno-user-defined-warnings',
], ],
}, },
# Required for component builds. See http://crbug.com/172800. # Required for component builds. See http://crbug.com/172800.
@ -75,6 +77,8 @@
'clang_warning_flags': [ 'clang_warning_flags': [
# protobuf-3 contains a few functions that are unused. # protobuf-3 contains a few functions that are unused.
'-Wno-unused-function', '-Wno-unused-function',
'-Wno-enum-compare',
'-Wno-user-defined-warnings',
], ],
}, },
'sources': [ 'sources': [
@ -399,6 +403,8 @@
'clang_warning_flags': [ 'clang_warning_flags': [
# protobuf-3 contains a few functions that are unused. # protobuf-3 contains a few functions that are unused.
'-Wno-unused-function', '-Wno-unused-function',
'-Wno-enum-compare',
'-Wno-user-defined-warnings',
], ],
}, },
'dependencies': [ 'dependencies': [