diff --git a/src/pallene/c_compiler.lua b/src/pallene/c_compiler.lua index e5272db8..6fad4c7d 100644 --- a/src/pallene/c_compiler.lua +++ b/src/pallene/c_compiler.lua @@ -55,21 +55,16 @@ function c_compiler.compile_c_to_o(in_filename, out_filename) }) end -function c_compiler.compile_o_to_so(in_filename, out_filename, _, _, flags) +function c_compiler.compile_o_to_so(in_filename, out_filename) -- There is no need to add the '-x' flag when compiling an object file without a '.o' extension. -- According to GCC, any file name with no recognized suffix is treated as an object file. - local command = { + return run_cc({ CFLAGS_SHARED, "-o", util.shell_quote(out_filename), util.shell_quote(in_filename), - } - - if flags.pt_dynamic or not flags.use_traceback then - table.insert(command, "-lptracer") - table.insert(command, "-Wl,-rpath="..PTLIBDIR) - end - - return run_cc(command) + "-lptracer", + "-Wl,-rpath="..PTLIBDIR, + }) end return c_compiler diff --git a/src/pallene/coder.lua b/src/pallene/coder.lua index 406d77a2..15aa7762 100644 --- a/src/pallene/coder.lua +++ b/src/pallene/coder.lua @@ -1778,12 +1778,6 @@ function Coder:generate_module_header() if self.flags.use_traceback then table.insert(out, "/* Enable Pallene Tracer debugging. */") table.insert(out, "#define PT_DEBUG") - - if not self.flags.pt_dynamic then - table.insert(out, "/* Inlining for maximum performance during debugging. */") - table.insert(out, "#define PT_INLINE") - table.insert(out, "#define PT_IMPLEMENTATION") - end end table.insert(out, "") diff --git a/src/pallene/pallenec.lua b/src/pallene/pallenec.lua index 9cac5287..6c501bae 100644 --- a/src/pallene/pallenec.lua +++ b/src/pallene/pallenec.lua @@ -35,7 +35,6 @@ do -- No Pallene tracebacks p:flag("--use-traceback", "Use function traceback for debugging using Pallene Tracer") - p:flag("--pt-dynamic", "Use dynamic linking to Pallene Tracer. Reduced code redundancy, compromised performance") p:option("-O", "Optimization level") :args(1):convert(tonumber) @@ -74,8 +73,7 @@ end function pallenec.main() local flags = { - use_traceback = opts.use_traceback and true or false, - pt_dynamic = opts.pt_dynamic and true or false + use_traceback = opts.use_traceback and true or false } if opts.emit_c then compile("pln", "c", flags)