2018-08-15 00:21:29 +00:00
|
|
|
FROM alpine:3.8
|
|
|
|
|
|
|
|
# Install packages needed for Shaka Packager.
|
|
|
|
RUN apk add --no-cache bash build-base curl findutils git ninja python \
|
|
|
|
bsd-compat-headers linux-headers libexecinfo-dev
|
|
|
|
|
|
|
|
# Install depot_tools.
|
|
|
|
WORKDIR /
|
|
|
|
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
|
|
ENV PATH $PATH:/depot_tools
|
|
|
|
|
|
|
|
# Alpine uses musl which does not have mallinfo defined in malloc.h. Define the
|
|
|
|
# structure to workaround a Chromium base bug.
|
|
|
|
RUN sed -i \
|
|
|
|
'/malloc_usable_size/a \\nstruct mallinfo {\n int arena;\n int hblkhd;\n int uordblks;\n};' \
|
|
|
|
/usr/include/malloc.h
|
|
|
|
|
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
|
|
|
ENV GYP_DEFINES='musl=1'
|
2020-11-05 07:45:05 +00:00
|
|
|
# Alpine does not support python3 yet, but depot_tools enabled python3
|
|
|
|
# by default. Disable python3 explicitly for now.
|
|
|
|
# See https://github.com/google/shaka-packager/issues/763 for details.
|
|
|
|
ENV GCLIENT_PY3=0
|
2021-06-11 18:05:46 +00:00
|
|
|
# Bypass VPYTHON included by depot_tools, which no longer works in Alpine.
|
|
|
|
ENV VPYTHON_BYPASS="manually managed python not supported by chrome operations"
|
2018-08-15 00:21:29 +00:00
|
|
|
|
|
|
|
# Build and run this docker by mapping shaka-packager with
|
|
|
|
# -v "shaka-packager:/shaka-packager".
|