Files
sx/examples/65-add-framework.sx
agra 1c32d54e01 ios + ir cleanup
- ios: --target ios/ios-sim shorthands, iOS SDK auto-discovery,
  #framework directive + BuildOptions.add_framework hook,
  .app bundle + Info.plist + codesign (ad-hoc and real),
  --codesign-identity/--provisioning-profile/--entitlements flags,
  modules/std/{objc,uikit}.sx, dynamic class registration,
  typed objc_msgSend cast pattern, UIApplicationMain handoff,
  UIWindow scene attach. Runs on iPhone hardware.
- ir: silent .s64 defaults → loud diagnostics,
  resolveReturnType infers from body, sub-byte int sizes match LLVM,
  tuple type interning includes names, compile errors exit 1
- issue-NNNN convention: resolved bugs rename to focused features
- 50 regression tests passing
2026-05-17 13:19:08 +03:00

21 lines
593 B
Plaintext

// BuildOptions.add_framework registers an Apple framework at comptime,
// equivalent to a top-level `#framework "Name"` directive. The advantage:
// you can gate it with `inline if OS == .ios { ... }` or similar logic,
// keeping the framework off non-Apple builds.
#import "modules/std.sx";
#import "modules/compiler.sx";
configure_build :: () {
opts := build_options();
opts.add_framework("CoreFoundation");
}
#run configure_build();
CFAbsoluteTimeGetCurrent :: () -> f64 #foreign;
main :: () -> s32 {
t := CFAbsoluteTimeGetCurrent();
return if t > 0.0 then 0 else 1;
}