From d4f4a7eed0321af813df513931d56b94eecacc79 Mon Sep 17 00:00:00 2001 From: Ryan Stecker Date: Wed, 2 Jul 2014 13:29:59 -0500 Subject: [PATCH 1/2] Add an ambuild configure option to disable auto versioning. --- AMBuildScript | 2 +- configure.py | 2 ++ plugins/AMBuilder | 2 +- tools/buildbot/PackageScript | 10 ++++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index 892e849a..addc12d7 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -73,7 +73,7 @@ class SMConfig(object): self.versionlib = None def use_auto_versioning(self): - return builder.backend == 'amb2' + return builder.backend == 'amb2' and not builder.options.disable_auto_versioning @property def tag(self): diff --git a/configure.py b/configure.py index 0d54f330..65324d9f 100644 --- a/configure.py +++ b/configure.py @@ -31,4 +31,6 @@ run.options.add_option('-s', '--sdks', default='all', dest='sdks', 'comma-delimited list of engine names (default: %default)') run.options.add_option('--breakpad-dump', action='store_true', dest='breakpad_dump', default=False, help='Dump and upload breakpad symbols') +run.options.add_option('--disable-auto-versioning', action='store_true', dest='disable_auto_versioning', + default=False, help='Disable the auto versioning script') run.Configure() diff --git a/plugins/AMBuilder b/plugins/AMBuilder index 6eeeee80..932b3ffe 100644 --- a/plugins/AMBuilder +++ b/plugins/AMBuilder @@ -51,7 +51,7 @@ def build_plugin(script_path, smx_file): argv = argv, outputs = outputs, dep_type = 'msvc', - weak_inputs = SM.generated_headers + weak_inputs = SM.generated_headers or [] ) SM.smx_files[smx_file] = smx_entry diff --git a/tools/buildbot/PackageScript b/tools/buildbot/PackageScript index a24529aa..ae2396c5 100644 --- a/tools/buildbot/PackageScript +++ b/tools/buildbot/PackageScript @@ -51,10 +51,12 @@ for cxx_task in SM.extensions: builder.AddCopy(cxx_task.binary, folder_map['addons/sourcemod/extensions']) builder.AddCopy(SM.spcomp.binary, folder_map['addons/sourcemod/scripting']) -# Copy version_auto.inc. -for header in SM.generated_headers: - if 'version_auto.inc' in header.path: - builder.AddCopy(header, folder_map['addons/sourcemod/scripting/include']) + +if SM.use_auto_versioning(): + # Copy version_auto.inc. + for header in SM.generated_headers: + if 'version_auto.inc' in header.path: + builder.AddCopy(header, folder_map['addons/sourcemod/scripting/include']) # Export PDB files. We write to a file in the build folder which is pretty # verboten, but it's okay if it's in the root since AMBuild will never try From 6864bf0068e3ae5026579d5e632f69a7d11e7db1 Mon Sep 17 00:00:00 2001 From: Ryan Stecker Date: Sat, 5 Jul 2014 10:57:08 -0500 Subject: [PATCH 2/2] Only spew JIT compilation and opcodes when built with JIT_SPEW defined. --- sourcepawn/jit/x86/jit_x86.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sourcepawn/jit/x86/jit_x86.cpp b/sourcepawn/jit/x86/jit_x86.cpp index fafc30cc..a0930ba9 100644 --- a/sourcepawn/jit/x86/jit_x86.cpp +++ b/sourcepawn/jit/x86/jit_x86.cpp @@ -287,7 +287,7 @@ CompileFromThunk(BaseRuntime *runtime, cell_t pcode_offs, void **addrp, char *pc return err; } -#if !defined NDEBUG +#if defined JIT_SPEW g_engine1.GetDebugHook()->OnDebugSpew( "Patching thunk to %s::%s\n", runtime->plugin()->name, @@ -327,14 +327,12 @@ Compiler::emit(int *errp) return NULL; } -#if !defined NDEBUG +#if defined JIT_SPEW g_engine1.GetDebugHook()->OnDebugSpew( "Compiling function %s::%s\n", plugin_->name, GetFunctionName(plugin_, pcode_start_)); -#endif -#if defined DEBUG SpewOpcode(plugin_, code_start_, cip_); #endif @@ -352,7 +350,7 @@ Compiler::emit(int *errp) if (*cip_ == OP_PROC || *cip_ == OP_ENDPROC) break; -#if defined DEBUG +#if defined JIT_SPEW SpewOpcode(plugin_, code_start_, cip_); #endif