Commit Graph
49 Commits
Author SHA1 Message Date
Harold Brenes 7c917d56e9 Check for invalid subtargets.
- Add 'ios' pseudo-subtarget which triggets with either iPhone or iPhoneSimulator subtargets.

- Treat an explicit 'default' subtarget as exclusive only to the default subtarget, not an other platform-compatible subtargets.

- 'generic' continues to resolve to true for any platform-compatible subtarget as it names appears to imply such behavior.
2025-07-20 14:35:06 -04:00
Harold Brenes edc01293b2 Allow objective-c procedures to have their @objc_name attribute inferred.
The `@objc_name` is automatically inferred if it is not specified and
the procedure name is prefixed with type name specified in `@objc_type`,
followed by an `_`. What followed the `_` is interpreted as the `@objc_name`.
2025-07-16 17:14:57 -04:00
Harold Brenes efe4f40974 Fix @objc_implement methods not respecting @objc_is_class_method
Fix incorrect type encoding for objc_class
2025-07-15 23:47:13 -04:00
Harold Brenes 63b9cb18ef Missing rename in panic string 2025-07-14 22:32:06 -04:00
Harold Brenes bab4ce11fc Rename iOS subtarget to iPhone for consistency.
Add `ODIN_PLATFORM_SUBTARGET_IOS` builtin constant which evaluated to
`true` when the platform is `Darwin` and the subtarget it either `iPhone` or `iPhoneSimulator`
2025-07-14 21:55:28 -04:00
Harold Brenes 77e5c71414 Fix correct versioned target triplet for iphonesimulator subtarget
- Always set the `-m*-version-min` linker flag for non-macOS Darwin subtargets
2025-07-14 14:28:07 -04:00
Harold Brenes 070943aa98 Provide default minimum version for iOS and apply its target triplet.
- Fix incorrect clang_path override for iOS during link stage.
2025-07-14 12:59:25 -04:00
Harold Brenes 4d2d890b4c Fix accidental incorrect assignment 2025-07-13 20:29:54 -04:00
Harold Brenes 0e245fb40f Updated iOS/iPhoneSimulator build support 2025-07-13 20:17:30 -04:00
Harold Brenes 219b0fe535 Replace system:System.framework imports with system:System
This makes the linker work for both macOS and iOS targets
2025-07-13 15:45:21 -04:00
Harold Brenes 9a87611609 Fix leftover poor indentation for objc_ivars MPSCQueue 2025-07-13 15:39:41 -04:00
Harold Brenes b811414ed1 Use fi.is_dir instead of path_is_directory() when checking if an import is a directory with a .odin extension. 2025-07-13 15:24:53 -04:00
Harold Brenes 14e25c0f2a Fix lb_get_objc_type_encoding missing matrix and simdvec encodings and minor fixes. 2025-05-05 09:07:50 -04:00
Harold Brenes be2e4dec7d Resolve other TODOs 2025-05-03 13:06:57 -04:00
Harold Brenes fc082f5ea5 Remove some TODO. Leave important note 2025-05-03 03:21:03 -04:00
Harold Brenes 6d18560ca3 Move unconditionally exporting Objective-C methods to the right location 2025-05-03 03:09:31 -04:00
Harold Brenes cf3830a6a8 Fix checker errors. 2025-05-03 03:09:31 -04:00
Harold Brenes 33d37c72f9 Register all classes unconditionally 2025-05-03 03:09:31 -04:00
Harold Brenes a00b91577d Prevent multiple uses of the same Objective-C class name 2025-05-03 03:09:30 -04:00
Harold Brenes 5f0b47c373 Implement all checker specification for Objective-C class implementations and objc_ivar_get intrinsic 2025-05-03 00:59:33 -04:00
Harold Brenes 0746127654 Minor fixes in data type usage and style. 2025-04-30 22:16:53 -04:00
Harold Brenes 1505edef01 Change ivar offsets from u32 to (odin base type) int/native pointer size. 2025-04-30 22:09:33 -04:00
Harold Brenes dc8692b504 Use correct alignment value for class_addIvar. 2025-04-30 21:52:29 -04:00
Harold Brenes 998ed79738 Go back to objc_ivar_get instead of ivar_get. 2025-04-30 20:43:05 -04:00
Harold Brenes c2dfc4b749 Cleanup ivar generation for selector expressions.
Cleanup ObjC superclass resolution.
2025-04-30 20:32:34 -04:00
Harold Brenes abfbb2f9ed Use basic name instead of raw_name for type encoding complex and quats. 2025-04-30 20:32:28 -04:00
Harold Brenes 668a9a89b0 Complete lb_get_objc_type_encoding() implementation 2025-04-30 20:32:14 -04:00
Harold Brenes 5097e98da2 Better Objective-C object superclass cycle check 2025-04-30 20:32:05 -04:00
Harold Brenes 2dc5653fd1 Name fixes 2025-04-30 20:31:54 -04:00
Harold Brenes 89533f49e4 Fix more styling and minor issues 2025-04-27 23:05:17 -04:00
Harold Brenes f3923ed666 Fix indentations
Fix Objective-C wrapper procs not forwarding return value
2025-04-27 22:55:53 -04:00
Harold Brenes 6c9c239a5e Fix styling issues 2025-04-27 22:55:53 -04:00
Harold Brenes 974a197ce1 Allow the class's ivar to be used as a context provider receiver as well. 2025-04-23 02:06:01 -04:00
Harold Brenes 47abea1229 Add support for Objective-C method implementation with Odin calling convention.
Use @objc_context_provider to provide a context for a type.
2025-04-23 02:05:51 -04:00
Harold Brenes 730c844fc6 Fix bug in @encode implementation. 2025-04-23 02:05:43 -04:00
Harold Brenes 53adff38f0 Fixes to Ivar pseudo fields. 2025-04-23 02:05:33 -04:00
Harold Brenes bca02f81cd Include the ivar in the Objective-C class unconditionally of it being used or not.
Allow pseudo-fields for ivar access.
2025-04-22 19:18:53 -04:00
Harold Brenes b3b4d501ca Fix ivar in multi-module mode. 2025-04-21 02:43:16 -04:00
Harold Brenes a3de9c8de4 Add initial support for Objective-C class implementation 2025-04-20 21:53:46 -04:00
Harold Brenes 040d8b1d48 Fix 2 selectors in NSDictionary 2025-04-17 15:22:10 -04:00
Harold Brenes c5980ba6c4 Add linux build tag to core/sys/linux/sys.odin 2025-04-02 16:39:25 -04:00
Harold Brenes 6fda041e17 Add ~{memory} clobber to syscall intrinsics for platforms where it was not yet added.
This fixes #4972 and #4588.

As laytan asserts, there is no guarantee that a syscall will not modify memory that it just obtained from the user, or held onto via a previous syscall. Therefore this constraint should be required for all syscalls.
2025-03-26 19:25:06 -04:00
Harold Brenes 794e812932 Fixes crash when unused defines are used in conjunction with -ignore-warnings. 2025-01-15 02:04:49 -05:00
Harold Brenes 2ecf909be0 Fix open() foreign libc signature on Darwin 2024-05-27 11:55:58 -04:00
Harold Brenes cfd4fc835b Fix a few darwin libc signatures with incorrect parameters. 2024-05-26 19:40:08 -04:00
Harold Brenes f1b291ed62 Attempt to automatically resolve the sysroot on build_odin.sh on macOS 2024-05-16 17:53:41 -04:00
Harold Brenes 13b8a5b73d Reverting to calculated frequency timings method on macOS, but fixed 2024-03-29 05:04:40 -04:00
Harold Brenes b84a660806 Fix incorrect timings on macOS 2024-03-28 21:09:37 -04:00
Harold Brenes b543be0d15 Copy file names fromdirent into FileInfo during read_directory 2024-03-11 18:09:41 -04:00