mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-12 14:48:00 +03:00
Optimize size by removing unused data and functions
This commit is contained in:
parent
a444ce046b
commit
190e0261af
@ -170,8 +170,11 @@ void setupToolchain(NativeBinarySpec b) {
|
||||
} else {
|
||||
cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp'
|
||||
}
|
||||
|
||||
cfg.compilerOptions.args '-ffunction-sections', '-fdata-sections' // Remove unused code and data
|
||||
cfg.compilerOptions.args '-fno-rtti', '-fno-exceptions'
|
||||
|
||||
cfg.linkerOptions.args '-Wl,--version-script=../version_script.lds', '-Wl,--gc-sections'
|
||||
|
||||
cfg.projectLibpath(project, '/lib/linux32')
|
||||
cfg.extraLibs 'rt', 'dl', 'm', 'steam_api', 'aelf32'
|
||||
}
|
||||
|
8
version_script.lds
Normal file
8
version_script.lds
Normal file
@ -0,0 +1,8 @@
|
||||
HLDS_ABI_1.0 {
|
||||
global:
|
||||
CreateInterface;
|
||||
F;
|
||||
NET_Sleep_Timeout;
|
||||
local:
|
||||
*;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user