Skip to content
Snippets Groups Projects
Commit d81b7981070c authored by Chun-wei Fan's avatar Chun-wei Fan
Browse files

win32: Add configuration for profiler

Without this the generated xsltconfig.h will not be complete as there
will be a configuration variable that is left in the header, breaking
builds.

This will allow one to enable or disable profiler support in Windows
builds, and the default is to enable this.
parent 451c07ee85fd
No related branches found
No related tags found
No related merge requests found
Pipeline #167 failed
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
var withZlib = false; var withZlib = false;
var withCrypto = true; var withCrypto = true;
var withModules = false; var withModules = false;
var withProfiler = true;
/* Win32 build options. */ /* Win32 build options. */
var dirSep = "\\"; var dirSep = "\\";
var compiler = "msvc"; var compiler = "msvc";
...@@ -106,6 +107,7 @@ ...@@ -106,6 +107,7 @@
txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n"; txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n";
txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n"; txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n";
txt += " modules: Enable Module support (" + (withModules? "yes" : "no") + ")\n"; txt += " modules: Enable Module support (" + (withModules? "yes" : "no") + ")\n";
txt += " profiler: Enable Profiler support (" + (withProfiler? "yes" : "no") + ")\n";
txt += "\nWin32 build options, default value given in parentheses:\n\n"; txt += "\nWin32 build options, default value given in parentheses:\n\n";
txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n"; txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n";
txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n"; txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
...@@ -192,6 +194,7 @@ ...@@ -192,6 +194,7 @@
vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0")); vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0")); vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0"));
vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0")); vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
vf.WriteLine("WITH_PROFILER=" + (withProfiler? "1" : "0"));
vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0")); vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
vf.WriteLine("STATIC=" + (buildStatic? "1" : "0")); vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
vf.WriteLine("PREFIX=" + buildPrefix); vf.WriteLine("PREFIX=" + buildPrefix);
...@@ -240,6 +243,8 @@ ...@@ -240,6 +243,8 @@
of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0")); of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0"));
} else if (s.search(/\@WITH_MODULES\@/) != -1) { } else if (s.search(/\@WITH_MODULES\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0")); of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
} else if (s.search(/\@WITH_PROFILER\@/) != -1) {
of.WriteLine(s.replace(/\@WITH_PROFILER\@/, withProfiler? "1" : "0"));
} else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) { } else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) {
of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/, "NULL")); of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/, "NULL"));
} else } else
...@@ -343,6 +348,8 @@ ...@@ -343,6 +348,8 @@
withCrypto = strToBool(arg.substring(opt.length + 1, arg.length)); withCrypto = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "modules") else if (opt == "modules")
withModules = strToBool(arg.substring(opt.length + 1, arg.length)); withModules = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "profiler")
withProfiler = strToBool(arg.substring(opt.length + 1, arg.length));
else if (opt == "compiler") else if (opt == "compiler")
compiler = arg.substring(opt.length + 1, arg.length); compiler = arg.substring(opt.length + 1, arg.length);
else if (opt == "cruntime") else if (opt == "cruntime")
...@@ -477,6 +484,7 @@ ...@@ -477,6 +484,7 @@
txtOut += " With zlib: " + boolToStr(withZlib) + "\n"; txtOut += " With zlib: " + boolToStr(withZlib) + "\n";
txtOut += " Crypto: " + boolToStr(withCrypto) + "\n"; txtOut += " Crypto: " + boolToStr(withCrypto) + "\n";
txtOut += " Modules: " + boolToStr(withModules) + "\n"; txtOut += " Modules: " + boolToStr(withModules) + "\n";
txtOut += " Profiler: " + boolToStr(withProfiler) + "\n";
txtOut += "\n"; txtOut += "\n";
txtOut += "Win32 build configuration\n"; txtOut += "Win32 build configuration\n";
txtOut += "-------------------------\n"; txtOut += "-------------------------\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment