30 lines
657 B
Plaintext
30 lines
657 B
Plaintext
import("//build/libs/TEMPLATE.gni")
|
|
|
|
xOS_static_library("libobjc") {
|
|
sources = [
|
|
"src/NSObject.mm",
|
|
"src/class.mm",
|
|
"src/init.mm",
|
|
"src/memory.mm",
|
|
"src/msgsend_$target_arch.S",
|
|
"src/selector.mm",
|
|
]
|
|
|
|
include_dirs = [
|
|
"include/",
|
|
"//libs/libc/include/",
|
|
"//libs/",
|
|
]
|
|
|
|
deplibs = [ "libc" ]
|
|
|
|
configs = [ "//build/libs:libobjcc_flags" ]
|
|
|
|
# Currently, using Clang+LTO and arm32 as a traget, a weird issue
|
|
# happens, when linker can't resolve objc_load_function.
|
|
# Such functions contain `und` instruction and leads to a crash.
|
|
if (host == "llvm" && target_arch != "arm32") {
|
|
cflags = [ "-flto" ]
|
|
}
|
|
}
|