Skip to content

Commit

Permalink
Merge pull request #1768 from mppf/fix-extern-block-no-clang-included…
Browse files Browse the repository at this point in the history
…-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)
  • Loading branch information
mppf authored and thomasvandoren committed Mar 30, 2015
1 parent a64f841 commit 34eba66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/util/clangUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ void runClang(const char* just_parse_filename) {
std::string compileline = home + "/util/config/compileline";
if( debugCCode ) compileline += " DEBUG=1";
if( optimizeCCode ) compileline += " OPTIMIZE=1";
std::string readargsfrom = compileline + " --llvm"
std::string readargsfrom = compileline + (just_parse_filename?"":" --llvm") +
" --llvm-install-dir"
" --clang-sysroot-arguments"
" --includes-and-defines";
Expand Down

0 comments on commit 34eba66

Please sign in to comment.