bazel-contrib / bazel-contrib/rules_foreign_cc

rules_foreign_cc doesn't add -fPIC when --force_pic is specified

Open
#421 10 comments 4 reactions 0 assignees View on GitHub
help wanted
Dominant language
Starlark
Stars
737
Forks
270
PR merge metrics
No merged PRs in 30d

Description

Bazel adds -fPIC for other cc targets. This results link failure.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how rules_foreign_cc handles the --force_pic option and compare its compiler flags with Bazel's other cc targets. Reproduce the link failure, then verify that specifying --force_pic causes the foreign build to use -fPIC and links successfully.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.