diff --git a/Meta/gn/build/write_cmake_config.py b/Meta/gn/build/write_cmake_config.py index 05fbcb105b8..01126d73586 100644 --- a/Meta/gn/build/write_cmake_config.py +++ b/Meta/gn/build/write_cmake_config.py @@ -84,7 +84,7 @@ def main(): try: var, val = var.split(None, 1) in_line = '#define %s %s' % (var, val) # val ends in \n. - except _: + except ValueError: var = var.rstrip() in_line = '#define %s\n' % var if not values[var]: diff --git a/Meta/gn/secondary/AK/BUILD.gn b/Meta/gn/secondary/AK/BUILD.gn index 35eea6f7437..aec9485f49e 100644 --- a/Meta/gn/secondary/AK/BUILD.gn +++ b/Meta/gn/secondary/AK/BUILD.gn @@ -11,7 +11,10 @@ shared_library("AK") { output_name = "ak" public_configs = [ ":ak_headers" ] - public_deps = [ ":ak_debug_gen" ] + public_deps = [ + ":ak_backtrace_gen", + ":ak_debug_gen", + ] # FIXME: Split out non-kernel sources to their own set sources = [ @@ -287,3 +290,19 @@ write_cmake_config("ak_debug_gen") { "XML_PARSER_DEBUG=", ] } + +write_cmake_config("ak_backtrace_gen") { + input = "Backtrace.h.in" + output = "$root_gen_dir/AK/Backtrace.h" + if (current_os == "win") { + values = [ + "Backtrace_FOUND=", + "Backtrace_HEADER=", + ] + } else { + values = [ + "Backtrace_FOUND=1", + "Backtrace_HEADER=execinfo.h", + ] + } +}