1""" 2THIS IS THE EXTERNAL-ONLY VERSION OF THIS FILE. G3 HAS ITS OWN. 3 4This file contains flags for the C++ linker, referred to by Bazel as linkopts. 5 6Now that we have a modular build, this file could maybe go away and folded into our toolchains. 7 8""" 9 10CORE_LINKOPTS = select({ 11 "@platforms//os:android": [ 12 "-landroid", 13 "-ldl", 14 "-llog", # Provides __android_log_vprint, needed by //src/ports/SkDebug_android.cpp. 15 ], 16 "//conditions:default": [], 17}) 18 19OPT_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 35DEFAULT_LINKOPTS = CORE_LINKOPTS + OPT_LEVEL 36