Skip to content

Commit

Permalink
[gn build] (manually) port 83a798d (abi_breaking_checks in tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
nico committed Apr 6, 2022
1 parent 3681292 commit edddf38
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions llvm/utils/gn/build/buildflags.gni
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ declare_args() {
# Whether to build with optimizations.
is_optimized = !is_debug

# Enable additional checks that alter the LLVM C++ ABI.
llvm_enable_abi_breaking_checks = llvm_enable_assertions

# Debug info symbol level.
if (is_debug) {
symbol_level = 2
Expand Down
3 changes: 0 additions & 3 deletions llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ import("//llvm/version.gni")
# become declare_args if anyone wants to set them.

declare_args() {
# Enable additional checks that alter the LLVM C++ ABI.
llvm_enable_abi_breaking_checks = llvm_enable_assertions

# Iterate unordered llvm containers in reverse.
llvm_enable_reverse_iteration = false

Expand Down
6 changes: 6 additions & 0 deletions llvm/utils/gn/secondary/llvm/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ write_lit_config("lit_site_cfg") {
extra_values += [ "LLVM_ENABLE_EXPENSIVE_CHECKS=0" ] # Must be 0.
}

if (llvm_enable_abi_breaking_checks) {
extra_values += [ "LLVM_ENABLE_ABI_BREAKING_CHECKS=1" ]
} else {
extra_values += [ "LLVM_ENABLE_ABI_BREAKING_CHECKS=0" ] # Must be 0.
}

if (llvm_enable_threads) {
extra_values += [ "LLVM_ENABLE_THREADS=1" ]
} else {
Expand Down

0 comments on commit edddf38

Please sign in to comment.