Skip to content

Commit

Permalink
Fix executable names in lit.cfg
Browse files Browse the repository at this point in the history
On Windows `%flang1` and `%flang2` are interpreted incorrectly.
related issue: flang-compiler#1363
  • Loading branch information
tdusnoki committed Jun 29, 2023
1 parent 82e9084 commit d8c8629
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,11 @@ config.substitutions.append( ('%test_debuginfo', ' ' + config.llvm_src_root + '/
config.substitutions.append( ('%itanium_abi_triple', makeItaniumABITriple(config.target_triple)) )
config.substitutions.append( ('%ms_abi_triple', makeMSABITriple(config.target_triple)) )

config.substitutions.append( ('%flang1', ' ' + config.flang + '1 ') )
config.substitutions.append( ('%flang2', ' ' + config.flang + '2 ') )
config.substitutions.append( ('%flang', ' ' + config.flang + ' ') )
flang_root = os.path.splitext(config.flang)[0]
flang_suffix = os.path.splitext(config.flang)[1]
config.substitutions.append( ('%flang1', ' {}1{} '.format(flang_root, flang_suffix)) )
config.substitutions.append( ('%flang2', ' {}2{} '.format(flang_root, flang_suffix)) )
config.substitutions.append( ('%flang', ' {} '.format(config.flang)) )

# The host triple might not be set, at least if we're compiling flang from
# an already installed llvm.
Expand Down

0 comments on commit d8c8629

Please sign in to comment.