2016-07-01 18:09:28 +00:00
|
|
|
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
import("//build/config/sysroot.gni")
|
2020-02-24 21:04:18 +00:00
|
|
|
import("../clang/clang.gni")
|
2016-07-01 18:09:28 +00:00
|
|
|
|
|
|
|
config("sdk") {
|
2023-05-22 23:38:58 +00:00
|
|
|
if (!use_flutter_cxx) {
|
|
|
|
ldflags = [
|
|
|
|
"-nostdlib++",
|
|
|
|
"${clang_prefix}/../lib/libc++.a",
|
|
|
|
]
|
|
|
|
}
|
2016-07-01 18:09:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# On Mac, this is used for everything except static libraries.
|
|
|
|
config("mac_dynamic_flags") {
|
|
|
|
ldflags = [
|
|
|
|
"-Wl,-search_paths_first",
|
|
|
|
"-L.",
|
|
|
|
|
2016-09-29 21:09:40 +00:00
|
|
|
# Forces shared libraries to search for undefined symbols.
|
2016-10-26 15:50:54 +00:00
|
|
|
"-undefined",
|
|
|
|
"dynamic_lookup",
|
2016-09-29 21:09:40 +00:00
|
|
|
|
2016-07-01 18:09:28 +00:00
|
|
|
# Path for loading shared libraries for unbundled binaries.
|
|
|
|
"-Wl,-rpath,@loader_path/.",
|
|
|
|
|
|
|
|
# Path for loading shared libraries for bundled binaries. Get back from
|
|
|
|
# Binary.app/Contents/MacOS.
|
|
|
|
"-Wl,-rpath,@loader_path/../../..",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
# On Mac, this is used only for executables.
|
|
|
|
config("mac_executable_flags") {
|
|
|
|
ldflags = [ "-Wl,-pie" ] # Position independent.
|
|
|
|
}
|