Skip to content

Commit

Permalink
Merge pull request #56 from AjayBrahmakshatriya/master
Browse files Browse the repository at this point in the history
Added feature in builder_context to allow setting extract compiler flags when using dynamic includes
  • Loading branch information
AjayBrahmakshatriya authored Oct 19, 2023
2 parents 525c462 + 3092f04 commit de1b3c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/builder/builder_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/builder/builder_dynamic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit de1b3c0

Please sign in to comment.