Commit c2ca4f42 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

[ios] Remove duplicate code in "runtime_library" config definition

The code to rebase the path to the sdk was duplicated between clang
and swift. Use a local variable initialised with the value that was
computed in the two location, then use it to configure "-isysroot"
for clang and "-sdk" for swiftc.

Bug: none
Change-Id: Ic3794ceeea84c67404763cf5d86fc32c201e3a4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2471357
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarJavier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817444}
parent 4345a7dc
......@@ -84,26 +84,20 @@ config("compiler") {
# that is iOS-only. Please see that target for advice on what should go in
# :runtime_library vs. :compiler.
config("runtime_library") {
_sysroot_path = sysroot
if (ios_enable_relative_sdk_path) {
common_flags = [
"-isysroot",
rebase_path(sysroot, root_build_dir),
]
swiftflags = [
"-sdk",
rebase_path(sysroot, root_build_dir),
]
} else {
common_flags = [
"-isysroot",
sysroot,
]
swiftflags = [
"-sdk",
sysroot,
]
_sysroot_path = rebase_path(sysroot, root_build_dir)
}
common_flags = [
"-isysroot",
_sysroot_path,
]
swiftflags = [
"-sdk",
_sysroot_path,
]
if (use_xcode_clang && enable_ios_bitcode && !use_ios_simulator) {
if (is_debug) {
common_flags += [ "-fembed-bitcode-marker" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment