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

support Apple M1 (arm64), cpp kernel as x86_64 #311

Merged
merged 6 commits into from
Oct 14, 2021
Merged

support Apple M1 (arm64), cpp kernel as x86_64 #311

merged 6 commits into from
Oct 14, 2021

Conversation

vogler
Copy link
Collaborator

@vogler vogler commented Aug 3, 2021

Related issues:

We can try afterwards if this also helps with running on RPi or other ARM-based machines.
However, uname -m for 32bit kernel rpi3 says armv7l and for 64bit kernel rpi4 aarch64.

@vogler vogler self-assigned this Aug 3, 2021
@michael-schwarz
Copy link
Member

Do you want to address these related issues before merging this or should we merge it first (to get something working on M1 machines) and then tackle these separately?

@vogler
Copy link
Collaborator Author

vogler commented Aug 8, 2021

There are actually two goals:

I haven't tested how different preprocessing results for arm64 vs. x86_64 are (can be done on any machine).
To have comparable benchmarks, it might make sense to analyze as x86_64 even on other architectures.
OTOH it may conflict with the sizes determined by CIL in machdep.ml which would depend on #54.

With goblint/cil#41 fixed, we could merge this to cover the first goal.
I'll add -D__x86_64__ on arm64 (could do it for any arch I guess). #54 can then introduce an option arch or sth similar.

@vogler vogler changed the title fixes for Apple M1 cpp/parse as x86_64 code on Apple M1 (arm64) Aug 8, 2021
@sim642 sim642 added feature setup Dependencies, CI, releasing labels Aug 11, 2021
@vogler vogler changed the title cpp/parse as x86_64 code on Apple M1 (arm64) support Apple M1 (arm64), cpp kernel as x86_64 Oct 14, 2021
@vogler vogler merged commit 9d1d189 into master Oct 14, 2021
@vogler vogler deleted the arm64 branch October 14, 2021 07:48
@michael-schwarz
Copy link
Member

I think unlocked regression tests fail because the goblint.opam file was not regenerated in this PR and still has the old pin. We just don't see those failures yet on master because they only run nightly.

@vogler vogler restored the arm64 branch October 14, 2021 09:01
@vogler
Copy link
Collaborator Author

vogler commented Oct 14, 2021

Wow, so there are three files to update... I thought goblint.opam is generated on build, but apparently not.
Maybe we should add some dune rule for generating or at least checking goblint.opam and goblint.opam.locked when goblint.opam.template changes.
Fixed in 6c021ef - github apparently doesn't show commits on the PR branch after merge...

@sim642
Copy link
Member

sim642 commented Oct 14, 2021

Maybe we should add some dune rule for generating or at least checking goblint.opam and goblint.opam.locked when goblint.opam.template changes.

This would happen if we build everything with dune build directly, instead of having make just compile the .exe target. But I think then it also tries to do the JS build, which last I tried failed for me (JS dependencies aren't declared?).

@vogler
Copy link
Collaborator Author

vogler commented Oct 14, 2021

Also missing benchmark:

Error: Program js_of_ocaml not found in the tree or in PATH
 (context: default)
Hint: opam install js_of_ocaml-compiler
File "bench/deriving/dune", line 3, characters 12-21:
3 |  (libraries benchmark batteries.unthreaded)
                ^^^^^^^^^
Error: Library "benchmark" not found.

@vogler vogler mentioned this pull request Oct 14, 2021
fitnessflo added a commit to fitnessflo/analyzer that referenced this pull request Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature setup Dependencies, CI, releasing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants