MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj

Bug: `-fno_objc_arc` not passed to build commands with BwX

Open
#2,206 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug BwX
Dominant language
Swift
Stars
626
Forks
124
PR merge metrics
No merged PRs in 30d

Description

Description

We have an ObjC file that uses -fno_objc_arc, which stopped building after 1.4.0. Likely with https://github.com/MobileNativeFoundation/rules_xcodeproj/pull/2016

These flags don't appear to be included in the params files.

Reproduction steps
  1. Write ObjC that uses NSAutoReleasePool
  2. In the objc_library rule, pass -fno_objc_arc
  3. Generate project with BwX

It will not build as it is being built with ARC. The -fno_objc_arc is not passed to the build command either directly or in the params file.

Expected behavior

-fno_objc_arc is propegated.

rules_xcodeproj version

1.5.1

Xcode version

14.3

Bazel version

6.2

rules_apple version

No response

rules_swift version

No response

Additional information

No response

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 by reproducing the issue with the objc_library rule and BwX, then inspect the generated build commands and params files. Trace where compiler flags are collected and propagated; done means -fno_objc_arc reaches the build command and the ObjC source builds without ARC.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.