mapbox / mapbox/mason

Requirements for mason_compile for iOS builds

Open
#171 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
258
Forks
68
PR merge metrics
No merged PRs in 30d

Description

[For creating iOS universal binaries](https://github.com/mapbox/mason/blob/432ba70495e6651caacfade4e9288d58135c3498/mason.sh#L414-L447), `mason.sh` requires some things from the `script.sh`'s `mason_compile` that aren't obvious:
- `mason_compile` (or the commands it delegates to) must place static archives in `${MASON_PREFIX}/lib`.
- `mason_compile` (or the commands it delegates to) must use the `CFLAGS` environment variable (even if also using `CXXFLAGS`).
- `mason_compile` (or the commands it delegates to) must support being called multiple times, and must do a clean rebuild when called with `CFLAGS` different from the previous call. In particular if `mason_compile` delegates to `make` commands, they need to have way of ensuring a rebuild outside of normal file modification times.

This ticket is to discuss if there is some way to reduce this coupling between `mason.sh` and `mason_compile`, or where/how this should be documented if not.

cc @kkaefer @springmeyer

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mason.sh lines 414-447 and inspect the script.sh mason_compile entry point. Trace how static archives, CFLAGS, repeated calls, and clean rebuilds are handled, then decide whether the coupling should be reduced or documented. Done means the iOS build requirements are either decoupled or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
build-system
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.