summaryrefslogtreecommitdiff
path: root/build/config/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'build/config/BUILD.gn')
-rw-r--r--build/config/BUILD.gn29
1 files changed, 29 insertions, 0 deletions
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index fceb89892..980b88965 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -60,6 +60,9 @@ config("feature_flags") {
defines += [ "USE_GLIB=1" ]
}
if (use_ozone && !is_android) {
+ # Chrome code should check BUILDFLAG(IS_OZONE) instead of
+ # defined(USE_OZONE).
+ #
# Note that some Chrome OS builds unconditionally set |use_ozone| to true,
# but they also build some targets with the Android toolchain. This ensures
# that Android targets still build with USE_OZONE=0 in such cases.
@@ -228,6 +231,9 @@ group("common_deps") {
visibility = [
":executable_deps",
":loadable_module_deps",
+ ":rust_bin_deps",
+ ":rust_cdylib_deps",
+ ":rust_dylib_deps",
":shared_library_deps",
]
@@ -269,6 +275,15 @@ group("executable_deps") {
public_configs = [ "//build/config/sanitizers:link_executable" ]
}
+# Only the rust_bin template in BUILDCONFIG.gn should reference this.
+group("rust_bin_deps") {
+ public_deps = [ ":common_deps" ]
+ if (export_libcxxabi_from_executables) {
+ public_deps += [ "//buildtools/third_party/libc++abi" ]
+ }
+ public_configs = [ "//build/config/sanitizers:link_executable" ]
+}
+
# Only the loadable_module template in BUILDCONFIG.gn should reference this.
group("loadable_module_deps") {
public_deps = [ ":common_deps" ]
@@ -283,6 +298,20 @@ group("shared_library_deps") {
public_configs = [ "//build/config/sanitizers:link_shared_library" ]
}
+# Only the rust_dylib template in BUILDCONFIG.gn should reference this.
+group("rust_dylib_deps") {
+ public_deps = [ ":common_deps" ]
+
+ public_configs = [ "//build/config/sanitizers:link_shared_library" ]
+}
+
+# Only the rust_cdylib template in BUILDCONFIG.gn should reference this.
+group("rust_cdylib_deps") {
+ public_deps = [ ":common_deps" ]
+
+ public_configs = [ "//build/config/sanitizers:link_shared_library" ]
+}
+
# Executable configs -----------------------------------------------------------
# Windows linker setup for EXEs and DLLs.