diff --git a/include/builder/builder_context.h b/include/builder/builder_context.h index 113bc88..9fd2603 100644 --- a/include/builder/builder_context.h +++ b/include/builder/builder_context.h @@ -68,6 +68,7 @@ class builder_context { bool run_rce = false; bool feature_unstructured = false; bool dynamic_use_cxx = false; + std::string dynamic_compiler_flags = ""; std::string dynamic_header_includes = ""; bool is_visited_tag(tracer::tag &new_tag); diff --git a/src/builder/builder_dynamic.cpp b/src/builder/builder_dynamic.cpp index 1682061..ab41aa8 100644 --- a/src/builder/builder_dynamic.cpp +++ b/src/builder/builder_dynamic.cpp @@ -33,7 +33,8 @@ void *compile_and_return_ptr(builder_context &context, std::string source_name, compiler_name += " -std=c++11 -fPIC "; } - std::string compile_command = compiler_name + " -shared -O3 " + source_name + " -o " + compiled_name; + std::string compile_command = compiler_name + " -shared -O3 " + source_name + " -o " + compiled_name + + context.dynamic_compiler_flags; int err = system(compile_command.c_str()); if (err != 0) {