Skip to content

Commit da24c02

Browse files
authored
[clang-repl] Remove redundant shared flag while running clang-repl in browser (llvm#118107)
While running clang-repl in the browser, we would be interested in this cc1 command ` "" -cc1 -triple wasm32-unknown-emscripten -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name "<<< inputs >>>" -mrelocation-model static -mframe-pointer=none -ffp-contract=on -fno-rounding-math -mconstructor-aliases -target-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/ -v -fcoverage-compilation-dir=/ -resource-dir /lib/clang/19 -internal-isystem /include/wasm32-emscripten/c++/v1 -internal-isystem /include/c++/v1 -internal-isystem /lib/clang/19/include -internal-isystem /include/wasm32-emscripten -internal-isystem /include -std=c++17 -fdeprecated-macro -ferror-limit 19 -fvisibility=default -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fincremental-extensions -o "<<< inputs >>>.o" -x c++ "<<< inputs >>>" ` As can be seen `shared` is anyway overwritten by `static` which is also what would be provided by default. Hence we can get rid of the shared flag here.
1 parent e25c556 commit da24c02

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

clang/lib/Interpreter/Interpreter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ IncrementalCompilerBuilder::CreateCpp() {
200200
#ifdef __EMSCRIPTEN__
201201
Argv.push_back("-target");
202202
Argv.push_back("wasm32-unknown-emscripten");
203-
Argv.push_back("-shared");
204203
Argv.push_back("-fvisibility=default");
205204
#endif
206205
Argv.insert(Argv.end(), UserArgs.begin(), UserArgs.end());

0 commit comments

Comments
 (0)