Skip to content

Commit f2365b6

Browse files
committed
address reviews
1 parent 84088d9 commit f2365b6

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

include/xeus-cpp/xinterpreter_wasm.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#ifndef XEUS_CPP_INTERPRETER_WASM_HPP
1111
#define XEUS_CPP_INTERPRETER_WASM_HPP
1212

13-
#include <vector>
14-
1513
#include "xinterpreter.hpp"
1614
#include "xeus_cpp_config.hpp"
1715

@@ -24,9 +22,6 @@ namespace xcpp
2422
wasm_interpreter();
2523
virtual ~wasm_interpreter() = default;
2624

27-
private:
28-
29-
static std::vector<const char*> create_args();
3025
};
3126
}
3227

src/xinterpreter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ using Args = std::vector<const char*>;
2828

2929
void* createInterpreter(const Args &ExtraArgs = {}) {
3030
Args ClangArgs = {/*"-xc++"*/"-v"}; // ? {"-Xclang", "-emit-llvm-only", "-Xclang", "-diagnostic-log-file", "-Xclang", "-", "-xc++"};
31-
#ifndef EMSCRIPTEN
31+
#ifdef EMSCRIPTEN
32+
ClangArgs.push_back("-std=c++20");
33+
#else
3234
if (std::find_if(ExtraArgs.begin(), ExtraArgs.end(), [](const std::string& s) {
3335
return s == "-resource-dir";}) == ExtraArgs.end()) {
3436
std::string resource_dir = Cpp::DetectResourceDir();

src/xinterpreter_wasm.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ namespace xcpp
1717
{
1818

1919
wasm_interpreter::wasm_interpreter()
20-
: interpreter(create_args().size(), create_args().data())
20+
: interpreter(0, nullptr)
2121
{
2222
}
23-
24-
std::vector<const char*> wasm_interpreter::create_args()
25-
{
26-
static std::vector<const char*> Args = {"-Xclang", "-std=c++20"};
27-
return Args;
28-
}
2923
}

0 commit comments

Comments
 (0)