aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-04-28 15:28:14 +0100
committergingerBill <bill@gingerbill.org>2021-04-28 15:28:14 +0100
commit71ac145f49efa816f49b462df3ec38288a57d776 (patch)
tree2218d6d957b4fdc1037aa43dd53586145f75d6ea /src/main.cpp
parente50ef33c2a194ff1bd5ff0f485f2e6664d6519b0 (diff)
Remove dead code related to old backend
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp95
1 files changed, 16 insertions, 79 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 251616b56..427653feb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -265,22 +265,22 @@ i32 linker_stage(lbGenerator *gen) {
LIT(build_context.resource_filepath)
);
- if(result == 0) {
- result = system_exec_command_line_app("msvc-link",
- "\"%.*slink.exe\" %s \"%.*s.res\" -OUT:\"%.*s.%s\" %s "
- "/nologo /incremental:no /opt:ref /subsystem:%s "
- " %.*s "
- " %.*s "
- " %s "
- "",
- LIT(find_result.vs_exe_path), object_files, LIT(output_base), LIT(output_base), output_ext,
- link_settings,
- subsystem_str,
- LIT(build_context.link_flags),
- LIT(build_context.extra_linker_flags),
- lib_str
- );
- }
+ if (result == 0) {
+ result = system_exec_command_line_app("msvc-link",
+ "\"%.*slink.exe\" %s \"%.*s.res\" -OUT:\"%.*s.%s\" %s "
+ "/nologo /incremental:no /opt:ref /subsystem:%s "
+ " %.*s "
+ " %.*s "
+ " %s "
+ "",
+ LIT(find_result.vs_exe_path), object_files, LIT(output_base), LIT(output_base), output_ext,
+ link_settings,
+ subsystem_str,
+ LIT(build_context.link_flags),
+ LIT(build_context.extra_linker_flags),
+ lib_str
+ );
+ }
} else {
result = system_exec_command_line_app("msvc-link",
"\"%.*slink.exe\" %s -OUT:\"%.*s.%s\" %s "
@@ -1535,69 +1535,6 @@ void remove_temp_files(String output_base) {
}
-
-
-i32 exec_llvm_opt(String output_base) {
-#if defined(GB_SYSTEM_WINDOWS)
- // For more passes arguments: http://llvm.org/docs/Passes.html
-
- return system_exec_command_line_app("llvm-opt",
- "\"%.*sbin/opt\" \"%.*s.ll\" -o \"%.*s_memcpy_pass.bc\" -memcpyopt"
- "",
- LIT(build_context.ODIN_ROOT),
- LIT(output_base), LIT(output_base))
-
- || system_exec_command_line_app("llvm-opt",
- "\"%.*sbin/opt\" \"%.*s_memcpy_pass.bc\" -o \"%.*s.bc\" %.*s "
- "",
- LIT(build_context.ODIN_ROOT),
- LIT(output_base), LIT(output_base),
- LIT(build_context.opt_flags));
-#else
- // NOTE(zangent): This is separate because it seems that LLVM tools are packaged
- // with the Windows version, while they will be system-provided on MacOS and GNU/Linux
-
- return system_exec_command_line_app("llvm-opt",
- "opt \"%.*s.ll\" -o \"%.*s_memcpy_pass.bc\" -memcpyopt"
- "",
- LIT(output_base), LIT(output_base))
-
- || system_exec_command_line_app("llvm-opt",
- "opt \"%.*s_memcpy_pass.bc\" -o \"%.*s.bc\" %.*s "
- "",
- LIT(output_base), LIT(output_base),
- LIT(build_context.opt_flags));
-#endif
-}
-
-i32 exec_llvm_llc(String output_base) {
- // For more arguments: http://llvm.org/docs/CommandGuide/llc.html
-#if defined(GB_SYSTEM_WINDOWS)
- return system_exec_command_line_app("llvm-llc",
- "\"%.*sbin\\llc\" \"%.*s.bc\" -filetype=obj -O%d "
- "-o \"%.*s.obj\" "
- "%.*s"
- "",
- LIT(build_context.ODIN_ROOT),
- LIT(output_base),
- build_context.optimization_level,
- LIT(output_base),
- LIT(build_context.llc_flags));
-#else
- // NOTE(zangent): Linux / Unix is unfinished and not tested very well.
- return system_exec_command_line_app("llc",
- "llc \"%.*s.bc\" -filetype=obj -relocation-model=pic -O%d "
- "%.*s "
- "%s%.*s",
- LIT(output_base),
- build_context.optimization_level,
- LIT(build_context.llc_flags),
- build_context.cross_compiling ? "-mtriple=" : "",
- cast(int)(build_context.cross_compiling ? build_context.metrics.target_triplet.len : 0),
- build_context.metrics.target_triplet.text);
-#endif
-}
-
void print_show_help(String const arg0, String const &command) {
print_usage_line(0, "%.*s is a tool for managing Odin source code", LIT(arg0));
print_usage_line(0, "Usage");