mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 13:05:12 +00:00
Meta: Update the build rules for AK
The `gn` build did not generate the CMake configuration file for the backtrace module. Update the rules to configure the generated macros mirroring the CMake build.
This commit is contained in:
parent
96fbb33b13
commit
050ffddff3
Notes:
github-actions[bot]
2024-09-25 18:42:03 +00:00
Author: https://github.com/compnerd Commit: https://github.com/LadybirdBrowser/ladybird/commit/050ffddff31 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1519 Reviewed-by: https://github.com/ADKaster
2 changed files with 21 additions and 2 deletions
|
@ -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]:
|
||||
|
|
|
@ -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",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue