Closed tenko closed 7 months ago
I think I never fully introduced that option. At some point, I want to make the command-line interface of oberon-lang
as close to clang
and gcc
(but not msvc
😎) as possible. As part of this change, I'm planning to retire the --filetype
option and achieve the same by supporting the following options.
-c
(compile) will output an object file (*.o
or *.obj
)-S
(assembly) will output an assembly file (*.s
)-r
(run) will jit and run the input moduleOption -o
will override the default name of the output file and, additionally, --emit-llvm
will write a *.bc
file in compile mode and a *.ll
file in assembly mode.
Thus far the plan. Apart from introducing some of these options, I never implemented this functionality as the compiler currently does not support the full pipeline (including linking). Your fix seems fine for the time being!
Change implemented in pull request #19
I added/replaced the following lines to src\codegen\llvm\LLVMCodeGen.cpp from line 254:
This seems to fix the issue.