Skip to content

Commit

Permalink
switch back to -O2
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawSumma committed May 19, 2024
1 parent fb2d41b commit acd0979
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vm/backend/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ void *vm_cache_comp(const char *comp, const char *flags, const char *src) {
fwrite(src, len, 1, out);
fclose(out);
vm_io_buffer_t *cmd_buf = vm_io_buffer_new();
// vm_io_buffer_format(cmd_buf, "%s -shared -O2 -foptimize-sibling-calls -fPIC %s %s -o %s -w -pipe", comp, flags, c_file, so_file);
vm_io_buffer_format(cmd_buf, "%s -shared -g3 -foptimize-sibling-calls -fPIC %s %s -o %s -w -pipe", comp, flags, c_file, so_file);
vm_io_buffer_format(cmd_buf, "%s -shared -O2 -foptimize-sibling-calls -fPIC %s %s -o %s -w -pipe", comp, flags, c_file, so_file);
// vm_io_buffer_format(cmd_buf, "%s -shared -g3 -foptimize-sibling-calls -fPIC %s %s -o %s -w -pipe", comp, flags, c_file, so_file);
int res = system(cmd_buf->buf);
if (res) {
return NULL;
Expand Down
3 changes: 3 additions & 0 deletions vm/backend/tb_dyn.h
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,9 @@ vm_tb_dyn_func_t *vm_tb_dyn_comp(vm_tb_dyn_state_t *state, vm_block_t *entry) {
}
}
const char *buf = tb_c_buf_to_data(cbuf);
if (state->config->dump_c) {
printf("\n--- c ---\n%s", buf);
}
const char *cc_name = NULL;
switch (state->config->target) {
case VM_TARGET_TB_CC:
Expand Down

0 comments on commit acd0979

Please sign in to comment.