Skip to content

Commit

Permalink
[gn build] Manually port 90ccf21
Browse files Browse the repository at this point in the history
  • Loading branch information
aeubanks committed Jul 11, 2024
1 parent 9f8205d commit 46307f1
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions llvm/utils/gn/secondary/clang/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ write_lit_config("lit_site_cfg") {
"CMAKE_C_COMPILER=cc",
"ENABLE_BACKTRACES=1",
"ENABLE_SHARED=0",
"LLVM_BUILD_EXAMPLES=0",
"LLVM_BYE_LINK_INTO_TOOLS=0",
"LLVM_EXTERNAL_LIT=",
"LLVM_HOST_TRIPLE=$llvm_current_triple",
"LLVM_LIT_TOOLS_DIR=", # Intentionally empty, matches cmake build.
Expand Down Expand Up @@ -111,26 +113,37 @@ write_lit_config("lit_site_cfg") {
}

if (host_os == "mac") {
extra_values += [ "LLVM_PLUGIN_EXT=.dylib" ]
extra_values += [
"LLVM_PLUGIN_EXT=.dylib",
"SHLIBEXT=.dylib",
]
} else if (host_os == "win") {
extra_values += [ "LLVM_PLUGIN_EXT=.dll" ]
extra_values += [
"LLVM_PLUGIN_EXT=.dll",
"SHLIBEXT=.dll",
]
} else {
extra_values += [ "LLVM_PLUGIN_EXT=.so" ]
extra_values += [
"LLVM_PLUGIN_EXT=.so",
"SHLIBEXT=.so",
]
}

if (host_os == "win") {
extra_values += [
# See comment for Windows solink in llvm/utils/gn/build/toolchain/BUILD.gn
"CMAKE_LIBRARY_OUTPUT_DIRECTORY=" + rebase_path("$root_out_dir/bin", dir),
"LLVM_ENABLE_PLUGINS=1",
"LLVM_LIT_ERRC_MESSAGES=no such file or directory;is a directory;" +
"invalid argument;permission denied",
"PERL_EXECUTABLE="
"PERL_EXECUTABLE=",
]
} else {
extra_values += [
"CMAKE_LIBRARY_OUTPUT_DIRECTORY=" + rebase_path("$root_out_dir/lib", dir),
"LLVM_ENABLE_PLUGINS=1",
"LLVM_LIT_ERRC_MESSAGES=",
"PERL_EXECUTABLE=/usr/bin/perl"
"PERL_EXECUTABLE=/usr/bin/perl",
]
}

Expand Down

0 comments on commit 46307f1

Please sign in to comment.