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 6For similar reasons as ./copts.bzl, we define "global" flags we want to pass to the linker 7here. We do allow subpackages to conditionally set linkopts because that is likely to be more 8readable than trying to express with select statements whether a library should be linked against 9because the relevant Skia source file was compiled in. 10 11""" 12 13OPT_LEVEL = select({ 14 "//bazel/common_config_settings:debug_build": [], 15 "//bazel/common_config_settings:fast_build_linux": [ 16 "-Wl,--strip-debug", 17 ], 18 "//bazel/common_config_settings:fast_build_mac": [], 19 "//bazel/common_config_settings:release_build_mac": [ 20 "-dead_strip", 21 ], 22 "//bazel/common_config_settings:release_build_linux": [ 23 "-Wl,--gc-sections", 24 "-Wl,--strip-all", 25 ], 26}) 27 28DEFAULT_LINKOPTS = OPT_LEVEL 29