Skip to content

Commit

Permalink
Reduce optimised linux binary size (#279)
Browse files Browse the repository at this point in the history
* Reduce optimised linux binary size

* Remove -gsimple-template-names, unsupported
  • Loading branch information
GameChaos authored Nov 25, 2024
1 parent dba8f07 commit f32206e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion AMBuildScript
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ class MMSPluginConfig(object):
if builder.options.opt == '1':
cxx.defines += ['NDEBUG']
if cxx.behavior == 'gcc':
cxx.cflags += ['-O3']
cxx.cflags += ['-O3', '-flto']
cxx.cxxflags += ['-g1'] # override ambuild's default -g3 flag.
cxx.linkflags += ['-flto']
elif cxx.behavior == 'msvc':
cxx.cflags += ['/Ox', '/Zo']
cxx.linkflags += ['/OPT:ICF', '/OPT:REF']
Expand Down

0 comments on commit f32206e

Please sign in to comment.