Skip to content

Commit

Permalink
Add new attributes, add no-mvm / optimize-only builds, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rafradek committed Jan 11, 2023
1 parent 0962cf4 commit 027294f
Show file tree
Hide file tree
Showing 35 changed files with 1,122 additions and 817 deletions.
27 changes: 20 additions & 7 deletions AMBuildScript
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class ExtensionConfig(object):
self.mms_root = None
self.sm_root = None
self.exclude = []
self.optimize_mods_only = False
self.name = 'sigsegv'

@property
def tag(self):
Expand Down Expand Up @@ -107,20 +109,30 @@ class ExtensionConfig(object):
self.mms_root = Normalize(self.mms_root)

def configure(self):
if builder.options.exclude_mods_debug:
self.exclude += ['mods_debug']
if builder.options.exclude_mods_visualize:
self.exclude += ['mods_visualize']
if builder.options.exclude_mods_vgui:
self.exclude += ['mods_vgui']

cxx = builder.DetectCxx()

if cxx.like('gcc'):
self.configure_gcc(cxx)
elif cxx.vendor == 'msvc':
self.configure_msvc(cxx)

self.name = 'sigsegv'

if builder.options.exclude_mods_debug:
self.exclude += ['mods_debug']
if builder.options.exclude_mods_visualize:
self.exclude += ['mods_visualize']
if builder.options.exclude_mods_vgui:
self.exclude += ['mods_vgui']
if builder.options.exclude_mods_mvm:
self.exclude += ['mods_mvm']
cxx.defines += ['NO_MVM']
self.name += '-no-mvm'
if builder.options.optimize_mods_only:
self.optimize_mods_only = True
cxx.defines += ['OPTIMIZE_MODS_ONLY']
self.name += '-optimize-only'

# Optimization
# if builder.options.opt == '1':
# cxx.defines += ['NDEBUG']
Expand Down Expand Up @@ -188,6 +200,7 @@ class ExtensionConfig(object):
# cxx.cflags += ['-Winvalid-pch']
cxx.cflags += ['-Wno-unknown-pragmas']
cxx.cflags += ['-pthread']
cxx.cflags += ['-ffunction-sections']
# cxx.cflags += ['-gsplit-dwarf']
# cxx.cflags += ['-feliminate-dwarf2-dups']
# cxx.cflags += ['-gz']
Expand Down
Loading

0 comments on commit 027294f

Please sign in to comment.