airbnb / airbnb/BuckSample

linker flags error in cxx_library and "-I $(location //targets:myrule)" preprocessor flags

Open
#149 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
469
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Hi guys, I have 2 issues in `buck_local` project generation.

## 1. cxx_library rule is not included in linker flags `BuckLocal/BUCK`. This mapping caused compiler error (missing symbol) when I used cxx_library rule.

### Current
cxx_library() not included in linker flags `BuckLocal/BUCK`

### Expected
library gets linked in `BuckLocal/BUCK`
Screen Shot 2021-03-25 at 13 43 44

## 2. Some of my rules are using preprocessor_flag = ["-I $(location //targets:myrule)"]. Somehow this gets filtered in the query and included in linker flags.

### Current
Screen Shot 2021-03-25 at 13 39 28

**Caused by**
Screen Shot 2021-03-25 at 13 41 47

### Expected
**string "-lct#iphonesimulator-x86_64,private-headers.hm" not included in linker flags**

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting BuckLocal/BUCK and the buck_local project-generation logic that maps cxx_library rules and preprocessor_flag values into linker flags. Reproduce both reported cases, then verify that cxx_library dependencies are linked and that the -I $(location //targets:myrule) value and the shown private-header string are excluded from linker flags.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, objective-c
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.