mirror of https://github.com/mongodb/mongo
SERVER-104686: adding OS specific orderfiles (#36030)
GitOrigin-RevId: 0e7d093d0aee864b26cb1ba6cdf106ad74a1b977
This commit is contained in:
parent
b7f343d364
commit
e1c2efe336
|
|
@ -18,7 +18,6 @@ exports_files([
|
|||
".prettierrc",
|
||||
"pyproject.toml",
|
||||
"poetry.lock",
|
||||
"symbols.orderfile",
|
||||
"codeowners-validator",
|
||||
])
|
||||
|
||||
|
|
|
|||
|
|
@ -4777,7 +4777,7 @@ def doConfigure(myenv):
|
|||
myenv.AppendUnique(
|
||||
CCFLAGS=["-ffunction-sections"],
|
||||
LINKFLAGS=[
|
||||
"-Wl,--symbol-ordering-file=symbols.orderfile",
|
||||
"-Wl,--symbol-ordering-file=buildscripts/symbols.orderfile",
|
||||
"-Wl,--no-warn-symbol-ordering",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2364,12 +2364,40 @@ selects.config_setting_group(
|
|||
# symbol reordering options
|
||||
# --------------------------------------
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "symbol_ordering_file_enabled_al2023",
|
||||
match_all = [
|
||||
"@platforms//os:linux",
|
||||
"//bazel/platforms:amazon_linux_2023",
|
||||
":opt_any",
|
||||
":linker_lld",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "not_amazon_linux_2023",
|
||||
match_any = [
|
||||
"//bazel/platforms:ubuntu18",
|
||||
"//bazel/platforms:ubuntu20",
|
||||
"//bazel/platforms:ubuntu22",
|
||||
"//bazel/platforms:ubuntu24",
|
||||
"//bazel/platforms:amazon_linux_2",
|
||||
"//bazel/platforms:debian10",
|
||||
"//bazel/platforms:debian12",
|
||||
"//bazel/platforms:rhel8",
|
||||
"//bazel/platforms:rhel9",
|
||||
"//bazel/platforms:suse12",
|
||||
"//bazel/platforms:suse15",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "symbol_ordering_file_enabled",
|
||||
match_all = [
|
||||
"@platforms//os:linux",
|
||||
":opt_any",
|
||||
":linker_lld",
|
||||
"//bazel/config:not_amazon_linux_2023",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1358,12 +1358,17 @@ THIN_LTO_FLAGS = select({
|
|||
|
||||
SYMBOL_ORDER_COPTS = select({
|
||||
"//bazel/config:symbol_ordering_file_enabled": ["-ffunction-sections"],
|
||||
"//bazel/config:symbol_ordering_file_enabled_al2023": ["-ffunction-sections"],
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
SYMBOL_ORDER_LINKFLAGS = select({
|
||||
"//bazel/config:symbol_ordering_file_enabled": [
|
||||
"-Wl,--symbol-ordering-file=$(location //:symbols.orderfile)",
|
||||
"-Wl,--symbol-ordering-file=$(location //buildscripts:symbols.orderfile)",
|
||||
"-Wl,--no-warn-symbol-ordering",
|
||||
],
|
||||
"//bazel/config:symbol_ordering_file_enabled_al2023": [
|
||||
"-Wl,--symbol-ordering-file=$(location //buildscripts:symbols-al2023.orderfile)",
|
||||
"-Wl,--no-warn-symbol-ordering",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
|
|
@ -1385,7 +1390,8 @@ SHARED_ARCHIVE_LINKFLAGS = select({
|
|||
})
|
||||
|
||||
SYMBOL_ORDER_FILES = [
|
||||
"//:symbols.orderfile",
|
||||
"//buildscripts:symbols.orderfile",
|
||||
"//buildscripts:symbols-al2023.orderfile",
|
||||
]
|
||||
|
||||
# Passed to both the compiler and linker
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ load("@npm//:eslint/package_json.bzl", "bin")
|
|||
exports_files([
|
||||
"cheetah_source_generator.py",
|
||||
"clang_tidy_config_gen.py",
|
||||
"symbols.orderfile",
|
||||
"symbols-al2023.orderfile",
|
||||
])
|
||||
|
||||
py_binary(
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue