Skip to content

Commit

Permalink
address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
anutosh491 committed Dec 22, 2024
1 parent 84088d9 commit f2365b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
5 changes: 0 additions & 5 deletions include/xeus-cpp/xinterpreter_wasm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#ifndef XEUS_CPP_INTERPRETER_WASM_HPP
#define XEUS_CPP_INTERPRETER_WASM_HPP

#include <vector>

#include "xinterpreter.hpp"
#include "xeus_cpp_config.hpp"

Expand All @@ -24,9 +22,6 @@ namespace xcpp
wasm_interpreter();
virtual ~wasm_interpreter() = default;

private:

static std::vector<const char*> create_args();
};
}

Expand Down
4 changes: 3 additions & 1 deletion src/xinterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ using Args = std::vector<const char*>;

void* createInterpreter(const Args &ExtraArgs = {}) {
Args ClangArgs = {/*"-xc++"*/"-v"}; // ? {"-Xclang", "-emit-llvm-only", "-Xclang", "-diagnostic-log-file", "-Xclang", "-", "-xc++"};
#ifndef EMSCRIPTEN
#ifdef EMSCRIPTEN
ClangArgs.push_back("-std=c++20");
#else
if (std::find_if(ExtraArgs.begin(), ExtraArgs.end(), [](const std::string& s) {
return s == "-resource-dir";}) == ExtraArgs.end()) {
std::string resource_dir = Cpp::DetectResourceDir();
Expand Down
8 changes: 1 addition & 7 deletions src/xinterpreter_wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ namespace xcpp
{

wasm_interpreter::wasm_interpreter()
: interpreter(create_args().size(), create_args().data())
: interpreter(0, nullptr)
{
}

std::vector<const char*> wasm_interpreter::create_args()
{
static std::vector<const char*> Args = {"-Xclang", "-std=c++20"};
return Args;
}
}

0 comments on commit f2365b6

Please sign in to comment.