blob: c968be705b8306e32d3331e6dd6430d1f0a04bca [file] [log] [blame]
# Copyright 2023 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//starboard/build/config/mac/xcode_tools_path.gni")
config("host") {
configs = [ ":common" ]
sysroot_path =
"$xcode_tools_path/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
cflags = [ "-O2" ]
clang_flags = [
"-arch",
"x86_64",
"-mmacosx-version-min=10.12",
"-isysroot",
sysroot_path,
]
cflags += clang_flags
ldflags = clang_flags
asmflags = clang_flags
arflags = [
"-arch_only",
"x86_64",
"-syslibroot",
sysroot_path,
]
}
config("common") {
arflags = [ "-no_warning_for_no_symbols" ]
cflags_cc = [ "-std=gnu++14" ]
cflags_objcc = [ "-std=gnu++14" ]
cflags = [ "-fno-common" ]
asmflags = [ "-fno-common" ]
ldflags = [ "-fno-common" ]
ldflags += [
"-stdlib=libc++",
"-Xlinker",
"-no_deduplicate",
]
}