File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -28,22 +28,22 @@ using Args = std::vector<const char*>;
28
28
29
29
void * createInterpreter (const Args &ExtraArgs = {}) {
30
30
Args ClangArgs = {/* "-xc++"*/ " -v" };
31
- #ifndef EMSCRIPTEN
32
31
if (std::find_if (ExtraArgs.begin (), ExtraArgs.end (), [](const std::string& s) {
33
32
return s == " -resource-dir" ;}) == ExtraArgs.end ()) {
34
33
std::string resource_dir = Cpp::DetectResourceDir ();
35
- if (resource_dir.empty ())
36
- std::cerr << " Failed to detect the resource-dir\n " ;
37
- ClangArgs.push_back (" -resource-dir" );
38
- ClangArgs.push_back (resource_dir.c_str ());
34
+ if (!resource_dir.empty ()) {
35
+ ClangArgs.push_back (" -resource-dir" );
36
+ ClangArgs.push_back (resource_dir.c_str ());
37
+ } else {
38
+ std::cerr << " Failed to detect the resource-dir\n " ;
39
+ }
39
40
}
40
41
std::vector<std::string> CxxSystemIncludes;
41
42
Cpp::DetectSystemCompilerIncludePaths (CxxSystemIncludes);
42
43
for (const std::string& CxxInclude : CxxSystemIncludes) {
43
44
ClangArgs.push_back (" -isystem" );
44
45
ClangArgs.push_back (CxxInclude.c_str ());
45
46
}
46
- #endif
47
47
ClangArgs.insert (ClangArgs.end (), ExtraArgs.begin (), ExtraArgs.end ());
48
48
// FIXME: We should process the kernel input options and conditionally pass
49
49
// the gpu args here.
You can’t perform that action at this time.
0 commit comments