MobileNativeFoundation / MobileNativeFoundation/rules_xcodeproj

Bug: PIC isn't handled correctly

Open
#1,940 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

#1934 is one issue, but we also aren't correctly picking up the -fPIC compiler flag. We also don't handle the case of dynamic libraries correctly (it should favor the PIC version of libraries).

Expected behavior

We properly set the -fPIC compiler flag, and use the correct output path (pic or non), in all cases, especially in BwX mode.

rules_xcodeproj version

dc226d129aca2237982b98a95c80ed1ccc74f0c5

Xcode version

All

Bazel version

6.1.1

rules_apple version

No response

rules_swift version

No response

Additional information

https://github.com/bazelbuild/bazel/issues/17927

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 reading the related Bazel issue #17927 and issue #1934, then trace how rules_xcodeproj handles the -fPIC flag and dynamic-library output paths, especially in BwX mode. Done means PIC and non-PIC outputs are selected correctly in all cases and the behavior is covered by the relevant project tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.