Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing custom arguments to CreateInterpreter #77

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

a-turko
Copy link

@a-turko a-turko commented Jul 19, 2023

This resolves the issue #51 with the same title.

Parameters of the interpreter are read from the INTEROP_EXTRA_INTERPRETER_ARGS environment variable. If no arguments have been passed, the interpreter is created with -std=c++17 and -march=native.

Copy link
Collaborator

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR! Please take a look at the comment I left.


std::vector <const char *> InterpArgs = InterpArgString ?
split_by_spaces(InterpArgString) :
std::vector<const char *>({"-std=c++17", "-march=native"});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should prepend these to InterpArgs. Then when we append the flags from INTEROP_EXTRA_INTERPRETER_ARGS they will overwrite them if the user chose something else.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, fixed.

Parameters of the interpreter are read from the INTEROP_EXTRA_INTERPRETER_ARGS
environment variable. If no arguments have been passed, the interpreter is
created with -std=c++17 and -march=native.

Signed-off-by: Andrzej Turko <[email protected]>
@a-turko a-turko requested a review from vgvassilev July 20, 2023 07:46
@vgvassilev vgvassilev merged commit 4f35e0f into compiler-research:master Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants