arm64 fixes

This commit is contained in:
Alexander Frick 2023-08-14 21:04:03 -05:00
parent 774e28deac
commit 3fea8b75d0
6 changed files with 14 additions and 8 deletions

0
build_android.sh Normal file → Executable file
View File

View File

@ -27,6 +27,8 @@ sudo chmod -v +x depot_tools/autoninja &&
sudo chmod -v +x build.sh &&
sudo chmod -v +x build_android.sh &&
sudo chmod -v +x build_dmg.sh &&
sudo chmod -v +x build_mac.sh &&

View File

@ -69,7 +69,9 @@ if (is_official_build) {
# Thorium target that simply pulls in the chrome target as a dependency
group("thorium") {
deps = [ "//chrome:chrome" ]
if (is_win || is_linux || is_mac) {
deps = [ "//chrome:chrome" ]
}
if (is_win) {
deps += [ "//chrome:chrome_dll" ]

View File

@ -74,12 +74,12 @@ config("compiler") {
cflags += [ "--target=$android_abi_target$compile_api_level" ]
ldflags += [ "--target=$android_abi_target$compile_api_level" ]
if (current_cpu == "arm64" || target_cpu == "arm64") {
if (current_cpu == "arm64") {
cflags += [ "-march=armv8-a+simd", "-mfloat-abi=hard", "-mfpu=neon" ]
ldflags += [ "-march=armv8-a+simd" ]
}
if (current_cpu == "arm" || target_cpu == "arm") {
if (current_cpu == "arm") {
cflags += [ "-march=armv7-a" ]
ldflags += [ "-march=armv7-a" ]
}

View File

@ -1,4 +1,4 @@
# Copyright 2023 The Chromium Authors and Alex313031. All rights reserved.
# Copyright 2023 The Chromium Authors and Alex313031
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@ -48,12 +48,14 @@ config("compiler") {
ldflags = [ "-Wl,-O3", ] + common_mac_flags
if (target_cpu == "x64") {
cflags += [ "-maes", "-mavx", "-ffp-contract=fast", "-mf16c", "-mfma", "-Wno-unused-command-line-argument", ]
if (current_cpu == "arm64") {
cflags += [ "-march=armv8.3-a+simd", "-mfloat-abi=hard", "-mfpu=neon" ]
ldflags += [ "-march=armv8.3-a+simd" ]
}
if (current_cpu == "x64") {
cflags += [ "-maes", "-mavx", "-ffp-contract=fast", "-mf16c", "-mfma", "-Wno-unused-command-line-argument", ]
cflags += [ "-O3", "-maes", "-march=x86-64-v3", "-ffp-contract=fast", "-mf16c", "-mfma", ]
ldflags += [ "-Wl,-O3", "-maes", "-Wl,-mllvm,-march=x86-64-v3", "-Wl,-mllvm,-fp-contract=fast", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ]
}
if (save_unstripped_output) {

View File

@ -559,7 +559,7 @@ repack("pak") {
}
if (is_android) {
group("content_shell") {
group("thorium_shell") {
testonly = true
deps = [ "//content/shell/android:content_shell_apk" ]
}