mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-24 00:17:37 +01:00
SERVER-90930 adding symbol.orderfile and build flags (#22633)
GitOrigin-RevId: 8e3c8eb6aec4d3bca8e43253726ea4628ef7e6d0
This commit is contained in:
parent
ba4bee0dad
commit
fca47bffd1
11
SConstruct
11
SConstruct
@ -4766,6 +4766,17 @@ def doConfigure(myenv):
|
||||
# If possible with the current linker, mark relocations as read-only.
|
||||
myenv.AddToLINKFLAGSIfSupported("-Wl,-z,relro")
|
||||
|
||||
if linker_ld != "gold" and not env.TargetOSIs("darwin", "macOS"):
|
||||
myenv.AppendUnique(
|
||||
CCFLAGS=["-ffunction-sections"],
|
||||
LINKFLAGS=[
|
||||
"-Wl,--symbol-ordering-file=symbols.orderfile",
|
||||
"-Wl,--no-warn-symbol-ordering",
|
||||
],
|
||||
)
|
||||
else:
|
||||
print("WARNING: lld linker is required to sort symbols")
|
||||
|
||||
# As far as we know these flags only apply on posix-y systems,
|
||||
# and not on Darwin.
|
||||
if env.TargetOSIs("posix") and not env.TargetOSIs("darwin"):
|
||||
|
3200
symbols.orderfile
Normal file
3200
symbols.orderfile
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user