Skip to content

Conversation

liyishuai
Copy link

Propagate #180

The problem arises from this bug in clang
llvm/llvm-project#116278
which causes the following:

```
$ cc t.c -mpopcnt
clang: error: unsupported option '-mpopcnt' for target 'arm64-apple-darwin24.4.0'
$ cc t.c -mpopcnt -lpthread
```

The src/discover uses dune configurator, which always appends
the C link flags from ocamlopt to the command line, and so the
configurator erronously thinks that -mpopcnt will work.

Since the dune configurator can't easily be overridden, this
PR works around this specific link order issue by hand-calling
the cc compiler from the discover binary.

fixes janestreet#164 and janestreet#168

Signed-off-by: Yishuai Li <[email protected]>
@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants