Skip to content

Commit

Permalink
[gn build] semi-automatically ort 4f06d46 (LogicalView input files)
Browse files Browse the repository at this point in the history
  • Loading branch information
nico committed Oct 27, 2022
1 parent 687e5bc commit 3d71592
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
Expand Up @@ -24,5 +24,8 @@ static_library("LogicalView") {
"Core/LVSupport.cpp",
"Core/LVSymbol.cpp",
"Core/LVType.cpp",
"LVReaderHandler.cpp",
"Readers/LVBinaryReader.cpp",
"Readers/LVELFReader.cpp",
]
}
Expand Up @@ -3,15 +3,36 @@ import("//llvm/utils/unittest/unittest.gni")
unittest("DebugInfoLogicalViewTests") {
deps = [
"//llvm/lib/DebugInfo/LogicalView",
"//llvm/lib/MC/MCDisassembler",
"//llvm/lib/Testing/Support",
"//llvm/lib/Target:AllTargetsDescs",
"//llvm/lib/Target:AllTargetsDisassemblers",
"//llvm/lib/Target:AllTargetsInfos",
]
sources = [
"CommandLineOptionsTest.cpp",
"CompareElementsTest.cpp",
"ELFReaderTest.cpp",
"LocationRangesTest.cpp",
"LogicalElementsTest.cpp",
"SelectElementsTest.cpp",
"StringPoolTest.cpp",
"WarningInternalTest.cpp",
]

# DebugInfoLogicalViewTests uses llvm::getInputFileDirectory(), which expects
# a file called llvm.srcdir.txt next to the test executable that contains
# the path of the source directory (which contains this file).
# lit doesn't change the cwd while running googletests, so the cwd isn't
# well-defined. This means this has to be an absolute path.
# FIXME: This doesn't work with swarming. This should really be a data
# dependency, and the cwd while tests requiring input files run should
# be required to be some fixed directory.
# FIXME: Also, the GN way is to write this file at build time. But since
# there's only two uses of this, and since this is a pattern that hopefully
# will disappear again, and since it doesn't have any measurable performance
# hit, write the file at GN time.
# Note: This line here implicitly depends on unittest() setting output_dir to
# target_out_dir.
write_file("$target_out_dir/llvm.srcdir.txt", rebase_path("."))
}
Expand Up @@ -24,7 +24,7 @@ unittest("DebugInfoPDBTests") {
# dependency, and the cwd while tests requiring input files run should
# be required to be some fixed directory.
# FIXME: Also, the GN way is to write this file at build time. But since
# there's only one use of this, and since this is a pattern that hopefully
# there's only two uses of this, and since this is a pattern that hopefully
# will disappear again, and since it doesn't have any measurable performance
# hit, write the file at GN time.
# Note: This line here implicitly depends on unittest() setting output_dir to
Expand Down

0 comments on commit 3d71592

Please sign in to comment.