Skip to content

Commit

Permalink
Fix error in msvc driver
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed Jul 17, 2020
1 parent b46ee56 commit 25afe73
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/amalgamate/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void generate(
project_obj->error = true;
}

UT_EXPORT
BAKE_AMALGAMATE_EXPORT
int bakemain(bake_driver_api *driver) {
driver->generate(generate);
return 0;
Expand Down
14 changes: 7 additions & 7 deletions drivers/lang/c/src/msvc/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void add_flags(
ut_iter it = ut_ll_iter(flags_attr->is.array);
while (ut_iter_hasNext(&it)) {
bake_attr *attr = ut_iter_next(&it);
ut_strbuf_append(&cmd, " %s", attr->is.string);
ut_strbuf_append(cmd, " %s", attr->is.string);
}
}
} else {
Expand All @@ -71,7 +71,7 @@ void add_flags(
ut_iter it = ut_ll_iter(flags_attr->is.array);
while (ut_iter_hasNext(&it)) {
bake_attr *attr = ut_iter_next(&it);
ut_strbuf_append(&cmd, " %s", attr->is.string);
ut_strbuf_append(cmd, " %s", attr->is.string);
}
}
}
Expand All @@ -87,18 +87,18 @@ void add_flags(
}

/* Give project access to its own id */
ut_strbuf_append(&cmd, " /DBAKE_PROJECT_ID=\\\"%s\\\"", project->id);
ut_strbuf_append(cmd, " /DBAKE_PROJECT_ID=\\\"%s\\\"", project->id);

/* This macro is only set for source files of this project, and can be used
* to exclude header statements for dependencies */
char *building_macro = ut_asprintf(" /D%s_EXPORTS", project->id_underscore);
ut_strbuf_appendstr(&cmd, building_macro);
ut_strbuf_appendstr(cmd, building_macro);
free(building_macro);

/* Enable debugging code */
if (!config->debug) {
ut_strbuf_appendstr(&cmd, " /DNDEBUG");
ut_strbuf_appendstr(&cmd, " /DEBUG:FULL");
ut_strbuf_appendstr(cmd, " /DNDEBUG");
ut_strbuf_appendstr(cmd, " /DEBUG:FULL");
}
}

Expand Down Expand Up @@ -142,7 +142,7 @@ void compile_src(
ut_strbuf_appendstr(&cmd, " /WX");
}

add_flags(driver, config, project, cpp, cmd);
add_flags(driver, config, project, cpp, &cmd);

/* Add configured include paths */
bake_attr *include_attr = driver->get_attr("include");
Expand Down

0 comments on commit 25afe73

Please sign in to comment.