Skip to content

Commit 59d4185

Browse files
committed
Add Apple tvOS build option
Signed-off-by: Mateusz Szczygieł <[email protected]>
1 parent 78258d2 commit 59d4185

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

aws-lc-sys/builder/cmake_builder.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ impl CmakeBuilder {
200200
cmake_cfg.define("CMAKE_SYSTEM_NAME", "Darwin");
201201
cmake_cfg.define("CMAKE_OSX_SYSROOT", "macosx");
202202
}
203+
if target_os().trim() == "tvos" {
204+
cmake_cfg.define("CMAKE_SYSTEM_NAME", "tvOS");
205+
if effective_target().ends_with("-tvos-sim") || target_arch() == "x86_64" {
206+
cmake_cfg.define("CMAKE_OSX_SYSROOT", "appletvsimulator");
207+
} else {
208+
cmake_cfg.define("CMAKE_OSX_SYSROOT", "appletvos");
209+
}
210+
}
203211
}
204212

205213
if target_os() == "android" {

aws-lc-sys/builder/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,7 @@ fn invoke_external_bindgen(
915915
if let Some(prefix_str) = prefix {
916916
sym_prefix = if target_os().to_lowercase() == "macos"
917917
|| target_os().to_lowercase() == "ios"
918+
|| target_os().to_lowercase() == "tvos"
918919
|| (target_os().to_lowercase() == "windows" && target_arch() == "x86")
919920
{
920921
format!("_{prefix_str}_")

0 commit comments

Comments
 (0)