Debian Codegraph @

include/config/linkopts.bzl

raw
1 """
2 THIS IS THE EXTERNAL-ONLY VERSION OF THIS FILE. G3 HAS ITS OWN.
3
4 This file contains flags for the C++ linker, referred to by Bazel as linkopts.
5
6 Now that we have a modular build, this file could maybe go away and folded into our toolchains.
7
8 """
9
10 CORE_LINKOPTS = select({
11 "@platforms//os:android": [
12 "-landroid",
13 "-ldl",
14 "-llog", # Provides __android_log_vprint, needed by //src/ports/SkLog_android.cpp.
15 ],
16 "//conditions:default": [],
17 })
18
19 OPT_LEVEL = select({
20 "//bazel/common_config_settings:debug_build": [],
21 "//bazel/common_config_settings:fast_build_linux": [
22 "-Wl,--strip-debug",
23 ],
24 "//bazel/common_config_settings:fast_build_mac": [],
25 "//bazel/common_config_settings:release_build_mac": [
26 "-dead_strip",
27 ],
28 "//bazel/common_config_settings:release_build_linux": [
29 "-Wl,--gc-sections",
30 "-Wl,--strip-all",
31 ],
32 "//conditions:default": [],
33 })
34
35 DEFAULT_LINKOPTS = CORE_LINKOPTS + OPT_LEVEL