BUILD.gn (810B)
1 config("openbsd_config") { 2 public_configs = [ 3 "//build:compiler_std", 4 "//build:compiler_warnings", 5 "//build:strict_prototypes", 6 "//build:no_exceptions", 7 "//build:no_rtti", 8 "//build:posix_env", 9 ] 10 if (is_debug) { 11 public_configs += [ 12 "//build:debug", 13 "//build:no_optimize", 14 "//build:symbols", 15 ] 16 } else { 17 public_configs += [ 18 "//build:release", 19 "//build:optimize_size", 20 "//build:lto", 21 ] 22 } 23 } 24 25 source_set("openbsd") { 26 sources = [] 27 28 if (target_os == "linux" || target_os == "mac") { 29 sources += [ 30 "reallocarray.c", 31 "reallocarray.h", 32 ] 33 } 34 if (target_os == "linux") { 35 sources += [ 36 "strlcat.c", 37 "strlcat.h", 38 "strlcpy.c", 39 "strlcpy.h", 40 ] 41 } 42 configs += [ ":openbsd_config" ] 43 }