mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
Attempt to fix Linux static build GN flags
Change GN output directory from out/Release to out/Default to follow convention Remove unnecessary macOS flags and build dependencies in version 55
This commit is contained in:
+2
-12
@@ -89,22 +89,12 @@ Credits to [9Morello](//github.com/9Morello) for most of the work done on this p
|
||||
|
||||
* Xcode 7
|
||||
* Homebrew
|
||||
* Subversion client
|
||||
* Perl (for creating a `.dmg` package)
|
||||
* GNU patch (see next section)
|
||||
|
||||
### Setting up the build environment
|
||||
|
||||
1. Setup [Homebrew Versions](//github.com/Homebrew/homebrew-versions) if you haven't already: `brew tap homebrew/versions`
|
||||
2. Install GCC 4.9 via Homebrew:
|
||||
* `brew install gcc49`
|
||||
* `brew link gcc`
|
||||
3. Install GNU patch via Homebrew: `brew install homebrew/dupes/gpatch`
|
||||
4. Install Quilt via Homebrew: `brew install quilt`
|
||||
5. Install Ninja via Homebrew: `brew install ninja`
|
||||
6. Try running `svn info https://llvm.org/svn/llvm-project`
|
||||
* If asked to verify llvm.org's certificate fingerprint, accept it permanently and run this command again
|
||||
* If still asked to accept the fingerprint, try the solutions [on this page](http://stackoverflow.com/questions/6115170/svn-error-validating-server-certificate). Then try rerunning the command to verify the certificate is accepted.
|
||||
1. Install Quilt via Homebrew: `brew install quilt`
|
||||
2. Install Ninja via Homebrew: `brew install ninja`
|
||||
|
||||
See `build.py` for more on customizing the build environment or process.
|
||||
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ class Builder:
|
||||
ninja_command = "ninja"
|
||||
|
||||
# The build directory relative to the build sandbox
|
||||
build_output = pathlib.Path("out", "Release")
|
||||
build_output = pathlib.Path("out", "Default")
|
||||
|
||||
# The ninja targets to build
|
||||
build_targets = ["chrome"]
|
||||
|
||||
@@ -35,20 +35,6 @@ class MacOSBuilder(QuiltPatchComponent, GNMetaBuildComponent):
|
||||
def check_build_environment(self):
|
||||
super(MacOSBuilder, self).check_build_environment()
|
||||
|
||||
self.logger.info("Checking svn command...")
|
||||
result = self._run_subprocess(["svn", "--version", "--quiet"], stdout=subprocess.PIPE,
|
||||
universal_newlines=True)
|
||||
if not result.returncode is 0:
|
||||
raise BuilderException("svn command returned non-zero exit code {}".format(
|
||||
result.returncode))
|
||||
self.logger.debug("Using svn command version '{!s}'".format(result.stdout.strip("\n")))
|
||||
|
||||
self.logger.info("Checking libtool command...")
|
||||
libtool_path = shutil.which("libtool")
|
||||
if libtool_path is None:
|
||||
raise BuilderException("Could not find command 'libtool' in PATH variable")
|
||||
self.logger.debug("Found libtool at '{!s}'".format(libtool_path))
|
||||
|
||||
self.logger.info("Checking macOS SDK version...")
|
||||
result = self._run_subprocess(["xcrun", "--show-sdk-version"], stdout=subprocess.PIPE,
|
||||
universal_newlines=True)
|
||||
@@ -60,26 +46,6 @@ class MacOSBuilder(QuiltPatchComponent, GNMetaBuildComponent):
|
||||
result.stdout.strip()))
|
||||
self.logger.debug("Using macOS SDK version '{!s}'".format(result.stdout.strip()))
|
||||
|
||||
self.logger.info("Checking g++ compiler for building libc++...")
|
||||
gxx_compiler = shutil.which("g++-4.9")
|
||||
if not pathlib.Path(gxx_compiler).is_file():
|
||||
raise BuilderException("GNU compiler '{}' does not exist or is not a file".format(
|
||||
gxx_compiler))
|
||||
|
||||
def build(self):
|
||||
if (self._sandbox_dir / pathlib.Path("third_party", "libc++-static", "libc++.a")).exists():
|
||||
self.logger.info("libc++.a already exists. Skipping its building")
|
||||
else:
|
||||
self.logger.info("Building libc++.a ...")
|
||||
result = self._run_subprocess("./build.sh",
|
||||
cwd=str(self._sandbox_dir /
|
||||
pathlib.Path("third_party", "libc++-static")),
|
||||
shell=True)
|
||||
if not result.returncode == 0:
|
||||
raise BuilderException("libc++.a build script returned non-zero exit code")
|
||||
|
||||
super(MacOSBuilder, self).build()
|
||||
|
||||
def generate_package(self):
|
||||
# Based off of chrome/tools/build/mac/build_app_dmg
|
||||
self.logger.info("Generating .dmg file...")
|
||||
|
||||
@@ -51,11 +51,6 @@ class WindowsBuilder(GNUPatchComponent, GNMetaBuildComponent):
|
||||
self._files_cfg = (self._sandbox_dir /
|
||||
pathlib.Path("chrome", "tools", "build", "win", "FILES.cfg"))
|
||||
|
||||
# Fix build output directory based on user-specified target_cpu
|
||||
# If it cannot be determined, assume 32-bit. This uses the default directory
|
||||
if self.target_cpu == CPUArch.x64:
|
||||
self.build_output = pathlib.Path("out", "Release_x64")
|
||||
|
||||
def generate_build_configuration(self):
|
||||
self.logger.info("Running gn command...")
|
||||
if self.use_depot_tools_toolchain:
|
||||
|
||||
@@ -26,3 +26,4 @@ remove_webcore_debug_symbols=true
|
||||
enable_widevine=true
|
||||
enable_rlz_support=false
|
||||
symbol_level=0
|
||||
enable_iterator_debugging=false
|
||||
|
||||
@@ -1,11 +1 @@
|
||||
is_clang=true
|
||||
use_sysroot=false
|
||||
clang_use_chrome_plugins=false
|
||||
use_gconf=false
|
||||
use_gnome_keyring=false
|
||||
use_gold=true
|
||||
gold_path=""
|
||||
enable_iterator_debugging=false
|
||||
clang_base_path="/usr/lib/llvm-3.9"
|
||||
ffmpeg_branding="ChromeOS"
|
||||
is_official_build=true
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
ungoogled-macos/fix-libcxx-archive-build-script.patch
|
||||
ungoogled-macos/disable-symbol-order-verification.patch
|
||||
ungoogled-macos/add-trknotify-gn-dependency.patch
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# Modify libc++.a build script to make it build
|
||||
|
||||
--- a/third_party/libc++-static/build.sh
|
||||
+++ b/third_party/libc++-static/build.sh
|
||||
@@ -13,15 +13,15 @@ THIS_DIR="${PWD}/$(dirname "${0}")"
|
||||
# TODO(thakis): Figure out why our clang complains about visibility and
|
||||
# redeclarations.
|
||||
#CXX="$THIS_DIR/../llvm-build/Release+Asserts/bin/clang++"
|
||||
-CXX=c++
|
||||
+CXX=g++-4.9
|
||||
|
||||
|
||||
-FLAGS="-nostdinc++ -O3 -std=c++11 -fstrict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -arch i386 -arch x86_64 -isysroot $(xcrun -show-sdk-path)"
|
||||
+FLAGS="-nostdinc++ -O3 -std=c++11 -fstrict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.7 -arch x86_64 -isysroot $(xcrun -show-sdk-path)"
|
||||
|
||||
pushd "${DIR}"
|
||||
|
||||
-svn co --force https://llvm.org/svn/llvm-project/libcxx/trunk@$REV libcxx
|
||||
-svn co --force https://llvm.org/svn/llvm-project/libcxxabi/trunk@$REV libcxxabi
|
||||
+svn --non-interactive --trust-server-cert co --force https://llvm.org/svn/llvm-project/libcxx/trunk@$REV libcxx
|
||||
+svn --non-interactive --trust-server-cert co --force https://llvm.org/svn/llvm-project/libcxxabi/trunk@$REV libcxxabi
|
||||
|
||||
mkdir libcxxbuild
|
||||
cd libcxxbuild
|
||||
@@ -47,7 +47,6 @@ popd
|
||||
libtool -static -o libc++.a libcxx*/*.o
|
||||
|
||||
cp libc++.a "${THIS_DIR}/libc++.a"
|
||||
-upload_to_google_storage.py -b chromium-libcpp "${THIS_DIR}/libc++.a"
|
||||
|
||||
popd
|
||||
rm -rf "${DIR}"
|
||||
Reference in New Issue
Block a user