Skip to content

Commit 34eba66

Browse files
mppfthomasvandoren
authored andcommitted
Merge pull request #1768 from mppf/fix-extern-block-no-clang-included-runtime
Bug fix for extern block w/o clang-included runtime The --llvm option to compileline changes CHPL_TARGET_PLATFORM in order to use clang-included and prevent ABI issues when linking in the runtime. However, when I originally added that flag I neglected to remember that runClang runs both as an initial step in --llvm compiles but also as a parsing step with extern { } blocks even without --llvm. When it's just parsing the extern blocks, we shouldn't be changing the CHPL_TARGET_PLATFORM at all. Now we just leave out --llvm from the compileline flags if just_parse_filename is set. By removing the --llvm option to compileline if we're only parsing extern blocks (and not compiling with the LLVM backend), we remove the check that the runtime has been built with clang-included in that case. Tested with test/extern with and without --llvm and with no clang-included runtime without --llvm. Reviewed by @thomasvandoren (cherry picked from commit e3a84a6)
1 parent a64f841 commit 34eba66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: compiler/util/clangUtil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ void runClang(const char* just_parse_filename) {
827827
std::string compileline = home + "/util/config/compileline";
828828
if( debugCCode ) compileline += " DEBUG=1";
829829
if( optimizeCCode ) compileline += " OPTIMIZE=1";
830-
std::string readargsfrom = compileline + " --llvm"
830+
std::string readargsfrom = compileline + (just_parse_filename?"":" --llvm") +
831831
" --llvm-install-dir"
832832
" --clang-sysroot-arguments"
833833
" --includes-and-defines";

0 commit comments

Comments
 (0)