Skip to content

Commit

Permalink
[infra] Roll boringssl forward. Use clang for arm on Linux.
Browse files Browse the repository at this point in the history
fixes: dart-lang#32363
Change-Id: I68c3ea314b320e51e0dcbdc98b71cf3150800837
Reviewed-on: https://dart-review.googlesource.com/45742
Reviewed-by: Vyacheslav Egorov <[email protected]>
Commit-Queue: Zach Anderson <[email protected]>
  • Loading branch information
zanderso authored and [email protected] committed Mar 8, 2018
1 parent e775ae9 commit 8240134
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ vars = {
"barback_tag" : "@0.15.2+14",
"bazel_worker_tag": "@v0.1.9",
"boolean_selector_tag" : "@1.0.3",
"boringssl_gen_rev": "@39762c7f9ee4d828ff212838fae79528b94d5443",
"boringssl_rev" : "@a62dbf88d8a3c04446db833a1eb80a620cb1514d",
"boringssl_gen_rev": "@344f455fd13d46f054726638e76026156ea73aa9",
"boringssl_rev" : "@672f6fc2486745d0cabc3aaeb4e0a3cd13b37b12",
"charcode_tag": "@v1.1.1",
"chrome_rev" : "@19997",
"cli_util_tag" : "@0.1.2+1",
Expand Down
1 change: 1 addition & 0 deletions build/config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ _native_compiler_configs = [
"//build/config/compiler:compiler",
"//build/config/compiler:clang_stackrealign",
"//build/config/compiler:compiler_arm_fpu",
"//build/config/compiler:compiler_arm_thumb",
"//build/config/compiler:chromium_code",
"//build/config/compiler:default_include_dirs",
"//build/config/compiler:no_rtti",
Expand Down
18 changes: 12 additions & 6 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,6 @@ config("compiler") {
if (arm_tune != "") {
cflags += [ "-mtune=$arm_tune" ]
}
if (arm_use_thumb) {
cflags += [ "-mthumb" ]
if (is_android && !is_clang) { # Clang doesn't support this option.
cflags += [ "-mthumb-interwork" ]
}
}
if (!is_clang) {
# Clang doesn't support these flags.
cflags += [
Expand Down Expand Up @@ -380,6 +374,18 @@ config("compiler_arm_fpu") {
}
}

config("compiler_arm_thumb") {
if (current_cpu == "arm") {
if (arm_use_thumb) {
cflags = [ "-mthumb" ]
if (is_android && !is_clang) { # Clang doesn't support this option.
cflags += [ "-mthumb-interwork" ]
}
asmflags = cflags
}
}
}

# runtime_library -------------------------------------------------------------
#
# Sets the runtime library and associated options.
Expand Down
1 change: 1 addition & 0 deletions third_party/tcmalloc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ source_set("tcmalloc") {
configs -= [
"//build/config/compiler:chromium_code",
"//build/config/compiler:clang_stackrealign",
"//build/config/compiler:compiler_arm_thumb",
]
configs += [ ":internal_config" ]

Expand Down
12 changes: 1 addition & 11 deletions tools/gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,7 @@ def UseSanitizer(args):

def DontUseClang(args, target_os, host_cpu, target_cpu):
# We don't have clang on Windows.
return (target_os == 'win'
# TODO(infra): Clang cannot compile boringssl and tcmalloc in -mthumb
# mode.
# See dartbug.com/32363.
#
# We also can't compile the whole VM with clang in -marm mode
# See: dartbug.com/32362.
or (target_os == 'linux'
and target_cpu.startswith('arm')
and target_cpu != 'arm64'
and not UseSanitizer(args)))
return target_os == 'win'


def UseWheezySysroot(args, gn_args):
Expand Down

0 comments on commit 8240134

Please sign in to comment.