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

Missing -fwrapv when config cc-flags in moon.pkg.json in native backend #604

Closed
1 task
illusory0x0 opened this issue Feb 13, 2025 · 1 comment
Closed
1 task
Assignees

Comments

@illusory0x0
Copy link

Bug Report

Environment

OS

Operating System: Ubuntu

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy

MoonBit CLI Tools Version

moon 0.1.20250210 (da67b3c 2025-02-10) ~/.moon/bin/moon
moonc v0.1.20250210+7be093d1f ~/.moon/bin/moonc
moonrun 0.1.20250210 (da67b3c 2025-02-10) ~/.moon/bin/moonrun

Steps to Reproduce

User custom cc-flags option

{
  "link": {
    "native":{
      "cc-flags": ""
    }
  }
}
 moon test --dry-run  --target native

Minimal reproduction example

https://github.com/illusory0x0/moonbit-bug-report/tree/master/missing--fwrapv-when-config-cc-flags

Expected Behavior

cc ./target/native/debug/test/lib/lib.internal_test.c -I/home/w/.moon/include -O2 /home/w/.moon/lib/libmoonbitrun.o -fwrapv -fno-strict-aliasing -lm -o ./target/native/debug/test/lib/lib.internal_test.exe

Actual Behavior

// This is the key part.
cc ./target/native/debug/test/lib/lib.internal_test.c -I/home/w/.moon/include -fno-strict-aliasing  -lm -o ./target/native/debug/test/lib/lib.internal_test.exe

Checklist

  • (Optional) My case is minimal enough to be reproducible.

Related Links

moonbitlang/core#1594 (comment)
moonbitlang/core#1610 (comment)

@Young-Flash
Copy link
Collaborator

will fix at next release

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

2 participants