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

libmps: build both Release and Debug versions #204977

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nailuoGG
Copy link
Contributor

@nailuoGG nailuoGG commented Jan 21, 2025

Change list:

  • Adopt single compilation flow for all platforms (macOS/Linux)
  • Always produce release (libmps.a) and debug (libmps-debug.a) variants
  • Remove platform-specific build branches
brew install libmps

result:

 cd $(brew --prefix libmps)
➜ tree
.
├── INSTALL_RECEIPT.json
├── include
│   ├── mps.h
│   ├── mpsacl.h
│   ├── mpsavm.h
│   ├── mpscamc.h
│   ├── mpscams.h
│   ├── mpscawl.h
│   ├── mpsclo.h
│   ├── mpscmfs.h
│   ├── mpscmv2.h
│   ├── mpscmvff.h
│   ├── mpscmvt.h
│   ├── mpscsnc.h
│   ├── mpsio.h
│   ├── mpslib.h
│   ├── mpstd.h
│   └── mpswin.h
├── lib
│   ├── libmps-debug.a
│   └── libmps.a
├── license.txt
├── readme.txt
├── release.rst
└── sbom.spdx.json
  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@github-actions github-actions bot added autosquash Automatically squash pull request commits according to Homebrew style. automerge-skip `brew pr-automerge` will skip this pull request labels Jan 21, 2025
@github-actions github-actions bot removed the automerge-skip `brew pr-automerge` will skip this pull request label Jan 21, 2025
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Jan 21, 2025
@nailuoGG nailuoGG changed the title libmps: add --with-debug option to build both Release and Debug versions libmps: build both Release and Debug versions Jan 21, 2025
@nailuoGG nailuoGG force-pushed the add-mps-debug branch 2 times, most recently from 7d8cf67 to 3a39cdf Compare January 21, 2025 05:34
- Adopt single compilation flow for all platforms (macOS/Linux)
- Always produce release (libmps.a) and debug (libmps-debug.a) variants
@nailuoGG
Copy link
Contributor Author

nailuoGG commented Jan 21, 2025

This change builds release and debug versions together.

It’s not standard but helps when debug symbols are needed (like crash analysis).

Copy link
Member

@SMillerDev SMillerDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to build debug versions, or have the build depend on a handcrafted compiler invocation.

@nailuoGG
Copy link
Contributor Author

nailuoGG commented Jan 21, 2025

I don't think we want to build debug versions, or have the build depend on a handcrafted compiler invocation.

Thanks for the feedback:

  1. Only release builds will stay in future versions.
  2. The custom script follows MPS's docs:
    "CONFIGURE/MAKE IS NOT THE BEST WAY TO BUILD THE MPS"
    (see their guide). and alert in configure.ac

Happy to follow both Homebrew-core and MPS's rules. Let me know if there's a simpler way to do this.

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

Successfully merging this pull request may close these issues.

2 participants