mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Name property would be used even under c3c test #2587.
This commit is contained in:
@@ -80,6 +80,7 @@
|
|||||||
- Compiler segfault when getting a nonexistant member from an unnamed struct #2533.
|
- Compiler segfault when getting a nonexistant member from an unnamed struct #2533.
|
||||||
- Correctly mention aliased type when method is not implemented #2534.
|
- Correctly mention aliased type when method is not implemented #2534.
|
||||||
- Regression: Not printing backtrace when tests fail for MacOS #2536.
|
- Regression: Not printing backtrace when tests fail for MacOS #2536.
|
||||||
|
- Name property would be used even under `c3c test` #2587.
|
||||||
|
|
||||||
### Stdlib changes
|
### Stdlib changes
|
||||||
- Sorting functions correctly took slices by value, but also other types by value. Now, only slices are accepted by value, other containers are always by ref.
|
- Sorting functions correctly took slices by value, but also other types by value. Now, only slices are accepted by value, other containers are always by ref.
|
||||||
|
|||||||
@@ -514,6 +514,7 @@ typedef struct BuildOptions_
|
|||||||
const char **feature_names;
|
const char **feature_names;
|
||||||
const char **removed_feature_names;
|
const char **removed_feature_names;
|
||||||
const char *output_name;
|
const char *output_name;
|
||||||
|
const char *runner_output_name;
|
||||||
const char *project_name;
|
const char *project_name;
|
||||||
const char *target_select;
|
const char *target_select;
|
||||||
const char *path;
|
const char *path;
|
||||||
@@ -673,6 +674,7 @@ typedef struct
|
|||||||
Library **library_list;
|
Library **library_list;
|
||||||
LibraryTarget **ccompiling_libraries;
|
LibraryTarget **ccompiling_libraries;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
const char *runner_output_name;
|
||||||
const char *output_name;
|
const char *output_name;
|
||||||
const char *extension;
|
const char *extension;
|
||||||
const char *version;
|
const char *version;
|
||||||
|
|||||||
@@ -599,7 +599,7 @@ static void parse_option(BuildOptions *options)
|
|||||||
if (match_shortopt("o"))
|
if (match_shortopt("o"))
|
||||||
{
|
{
|
||||||
if (at_end()) error_exit("error: -o needs a name.");
|
if (at_end()) error_exit("error: -o needs a name.");
|
||||||
options->output_name = next_arg();
|
options->runner_output_name = options->output_name = next_arg();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -644,6 +644,7 @@ void init_default_build_target(BuildTarget *target, BuildOptions *options)
|
|||||||
target->source_dirs = NULL;
|
target->source_dirs = NULL;
|
||||||
target->name = options->output_name;
|
target->name = options->output_name;
|
||||||
target->output_name = options->output_name;
|
target->output_name = options->output_name;
|
||||||
|
target->runner_output_name = options->runner_output_name;
|
||||||
update_build_target_from_options(target, options);
|
update_build_target_from_options(target, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -565,10 +565,12 @@ void compiler_compile(void)
|
|||||||
{
|
{
|
||||||
case TARGET_TYPE_BENCHMARK:
|
case TARGET_TYPE_BENCHMARK:
|
||||||
compiler.build.name = "benchmarkrun";
|
compiler.build.name = "benchmarkrun";
|
||||||
|
compiler.build.output_name = compiler.build.runner_output_name ? compiler.build.runner_output_name : compiler.build.name;
|
||||||
output_exe = exe_name();
|
output_exe = exe_name();
|
||||||
break;
|
break;
|
||||||
case TARGET_TYPE_TEST:
|
case TARGET_TYPE_TEST:
|
||||||
compiler.build.name = "testrun";
|
compiler.build.name = "testrun";
|
||||||
|
compiler.build.output_name = compiler.build.runner_output_name ? compiler.build.runner_output_name : compiler.build.name;
|
||||||
output_exe = exe_name();
|
output_exe = exe_name();
|
||||||
break;
|
break;
|
||||||
case TARGET_TYPE_EXECUTABLE:
|
case TARGET_TYPE_EXECUTABLE:
|
||||||
|
|||||||
Reference in New Issue
Block a user