aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a1136c4..5c3ad8c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -136,7 +136,8 @@ static void usageBuild(bool run)
printf(" --debug|--release Optimization level to build project and dependencies with (if not a system package) - Optional (default: --debug)\n");
printf(" --sanitize Add runtime address/undefined behavior sanitization. Program can be up to 3 times slower and use 10 times as much RAM. Ignored if compiler doesn't support sanitization - Optional (default: none)\n");
printf(" --platform The platform to build for - Optional (default: the running platform)\n");
- printf(" --lto Use link-time optimization. May increase compile times - Optional (default: false)\n");
+ printf(" --lto Use link-time optimization. May increase compile times - Optional (default: not used)\n");
+ printf(" --debug-symbols Include debug symbols in release mode - Optional (default: not used)\n");
printf("Examples:\n");
printf(" sibs %s\n", run ? "run" : "build");
if(run)
@@ -492,6 +493,7 @@ static int buildProject(int argc, const _tinydir_char_t **argv, bool run)
Sanitize sanitize = Sanitize::NONE;
FileString platformName;
bool use_lto = false;
+ bool include_debug_symbols_in_release = false;
std::vector<FileString> run_args;
for(int i = 0; i < argc; ++i)
@@ -519,6 +521,10 @@ static int buildProject(int argc, const _tinydir_char_t **argv, bool run)
{
use_lto = true;
}
+ else if(_tinydir_strcmp(arg, TINYDIR_STRING("--debug-symbols")) == 0)
+ {
+ include_debug_symbols_in_release = true;
+ }
else if(_tinydir_strncmp(arg, TINYDIR_STRING("--sanitize="), 11) == 0)
{
sanitize = sanitize_string_to_type(arg + 11);
@@ -627,6 +633,7 @@ static int buildProject(int argc, const _tinydir_char_t **argv, bool run)
sibsConfig.platform = platform;
sibsConfig.setSanitize(sanitize);
sibsConfig.use_lto = use_lto;
+ sibsConfig.include_debug_symbols_in_release = include_debug_symbols_in_release;
return buildProject(projectPath, projectConfFilePath, sibsConfig, run, run_args);
}