diff options
author | Anutosh Bhat <andersonbhat491@gmail.com> | 2024-12-06 13:05:00 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-06 08:35:00 +0100 |
commit | da24c02466e4d3201887806e038eb71f45bd08ee (patch) | |
tree | f7d663ab269f773e70a08ac2745b1b179fd9b9e6 /clang/lib/Interpreter/Interpreter.cpp | |
parent | e25c556abeb9ae5f82da42cd26b9dae8462a7197 (diff) | |
download | llvm-da24c02466e4d3201887806e038eb71f45bd08ee.zip llvm-da24c02466e4d3201887806e038eb71f45bd08ee.tar.gz llvm-da24c02466e4d3201887806e038eb71f45bd08ee.tar.bz2 |
[clang-repl] Remove redundant shared flag while running clang-repl in browser (#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.
Diffstat (limited to 'clang/lib/Interpreter/Interpreter.cpp')
-rw-r--r-- | clang/lib/Interpreter/Interpreter.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp index 887b494..fa4c143 100644 --- a/clang/lib/Interpreter/Interpreter.cpp +++ b/clang/lib/Interpreter/Interpreter.cpp @@ -200,7 +200,6 @@ IncrementalCompilerBuilder::CreateCpp() { #ifdef __EMSCRIPTEN__ Argv.push_back("-target"); Argv.push_back("wasm32-unknown-emscripten"); - Argv.push_back("-shared"); Argv.push_back("-fvisibility=default"); #endif Argv.insert(Argv.end(), UserArgs.begin(), UserArgs.end()); |