Skip to content

Conversation

@peace-maker
Copy link
Member

This allows to link sourcemod with --enable-debug on Windows.

This allows to link sourcemod with `--enable-debug` on Windows.

for compiler in SafetyHook.all_targets:
binary = libsafetyhook.Configure(compiler, libsafetyhook.name, 'Release - {0}'.format(compiler.target.arch))
tag = 'Debug' if builder.options.debug == '1' else 'Release'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we decide whether or not we're in debug through a function call on SafetyHook structure ?
I'm mainly thinking of subprojects that need to include safetyhook for CDetour and might want some control over this. Granted, we're already nuking any preset compiler flags, so why should we care for debug but still.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, this would require them to have a debug option in their configure.py which is a common way to enable debug builds though. How would that EnableDebug function be used?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally I'm thinking something like
https://github.com/alliedmodders/sourcemod/blob/master/AMBuildScript#L589

  @property
  def debug(self):
    return builder.options.debug == '1'

Or perhaps even reuse the tag property ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants