Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

objc/NuOperators.m: some #if-conditional code needed to build on ARM64 #102

Open
cho-m opened this issue Oct 1, 2022 · 0 comments
Open

Comments

@cho-m
Copy link
Contributor

cho-m commented Oct 1, 2022

Seen while fixing Homebrew ARM64 build: Homebrew/homebrew-core#112070

Specifically, some code inside #if defined(__x86_64__) || TARGET_OS_IPHONE sections are needed to build a working mininush otherwise subsequent build steps output:

==> ./mininush tools/nuke
Nu uncaught exception: NuIvarAddedTooLate: explicit instance variables must be added when a class is created and before any method declarations
  from tools/nuke:137: in ivar
  from <TopLevel>:-1: in class
  from <TopLevel>:1: in progn

Not entirely sure what conditional is needed so opened issue rather than PR. In Homebrew, I just added defined(__arm64__) to compile the code.


e.g.

nu/objc/NuOperators.m

Lines 1798 to 1800 in 1b0cd7f

#if defined(__x86_64__) || TARGET_OS_IPHONE
Class newClass = nil;
#endif

#if defined(__x86_64__) || TARGET_OS_IPHONE

#if defined(__x86_64__) || TARGET_OS_IPHONE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant