New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement C++ Starlark API #4570

Open
oquenchil opened this Issue Feb 2, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@oquenchil
Copy link
Contributor

oquenchil commented Feb 2, 2018

Description of the problem / feature request:

The API should expose to Skylark from Java the logic for the creation of compilation and linking actions.

Feature requests: what underlying problem are you trying to solve with this feature?

The main problem to solve is inter-operability between different rules/languages that have dependencies on C++ code.

@oquenchil oquenchil self-assigned this Feb 2, 2018

bazel-io pushed a commit that referenced this issue Jul 19, 2018

C++: Implements Skylark cc_common.compile()/link().
Working towards #4570.

RELNOTES:none
PiperOrigin-RevId: 205274676
@hlopko

This comment has been minimized.

Copy link
Contributor

hlopko commented Jul 31, 2018

Bazel@HEAD now accepts --experimental_enable_cc_skylark_api that will enable the current WIP version of the API. It's only for experimenting at this point, we break it daily, and we will not support users using it yet. But feedback is more than welcomed.

@mfarrugi

This comment has been minimized.

Copy link

mfarrugi commented Jul 31, 2018

Is there a better way to traverse the API than print(dir(ctx.attr.cc_lib.cc))?

Would like to see if it better fits bazelbuild/rules_rust#108

werkt added a commit to werkt/bazel that referenced this issue Aug 2, 2018

C++: Implements Skylark cc_common.compile()/link().
Working towards bazelbuild#4570.

RELNOTES:none
PiperOrigin-RevId: 205274676

bazel-io pushed a commit that referenced this issue Sep 20, 2018

C++: Make cc_binary's linking go through CcLinkingHelper.
CcLinkingHelper has new functionality to support transitive linking. This is
not exposed to Skylark yet.

GitHub issue #4570

RELNOTES:none
PiperOrigin-RevId: 213824305

bazel-io pushed a commit that referenced this issue Sep 25, 2018

Automated rollback of commit d37c675.
*** Reason for rollback ***

b/116592380

*** Original change description ***

C++: Make cc_binary's linking go through CcLinkingHelper.

CcLinkingHelper has new functionality to support transitive linking. This is
not exposed to Skylark yet.

GitHub issue #4570

RELNOTES:none
PiperOrigin-RevId: 214451346

bazel-io pushed a commit that referenced this issue Sep 27, 2018

C++: Make cc_binary's linking go through CcLinkingHelper.
CcLinkingHelper has new functionality to support transitive linking. This is
not exposed to Starlark yet.

GitHub issue #4570

This was rolled back because in the refactoring I started passing headers to the linking action that were not passed before. These headers have mistakes and cannot be pre-processed, so when they were passed as inputs to the linking action, the compilation action was executed whereas before it wasn't.

Fixed and added test to make sure the behavior is the same as before.

RELNOTES:none
PiperOrigin-RevId: 214785687

@hlopko hlopko added the bazel 1.0 label Nov 28, 2018

@hlopko hlopko changed the title Implement C++ Skylark API Implement C++ Starlark API Dec 5, 2018

bazel-io pushed a commit that referenced this issue Dec 19, 2018

C++: Exposes additional fields of compilation context
quote_dirs and include_dirs. These fields will be needed in the future to avoid people passing -iquote and -I flags in copts. This also allows removal of old Starlark C++ API.

#4570

RELNOTES:none
PiperOrigin-RevId: 226176928

bazel-io pushed a commit that referenced this issue Jan 2, 2019

C++: Remove whitelist flag for new API
Remove the flag for parts of the API that are stable.

#4570

RELNOTES: None.
PiperOrigin-RevId: 227516883

bazel-io pushed a commit that referenced this issue Jan 2, 2019

C++: Remove old params from API
#4570

RELNOTES:none
PiperOrigin-RevId: 227522672

bazel-io pushed a commit that referenced this issue Jan 4, 2019

C++: Remove more bits from old C++ Starlark API
Progress towards #4570

RELNOTES: None
PiperOrigin-RevId: 227816518

bazel-io pushed a commit that referenced this issue Jan 11, 2019

Fix names in C++ Starlark Api
This is make our documentation properly generated and identifier hyperlinked.

#4570

RELNOTES: None.
PiperOrigin-RevId: 228861953

bazel-io pushed a commit that referenced this issue Jan 14, 2019

C++: Remove more CcLinkParams
Tracking: #4570

RELNOTES:none
PiperOrigin-RevId: 229181236

bazel-io pushed a commit that referenced this issue Jan 16, 2019

Automated rollback of commit 924eee0.
*** Reason for rollback ***

Breaks nightly

*** Original change description ***

C++: Remove more CcLinkParams

Tracking: #4570

RELNOTES:none
PiperOrigin-RevId: 229584100

laszlocsomor pushed a commit to laszlocsomor/bazel that referenced this issue Jan 18, 2019

C++: Remove more CcLinkParams
Tracking: bazelbuild#4570

Fixes conversion bug from old API to new that was already present before the original CL but was only triggered with it.

RELNOTES:none
PiperOrigin-RevId: 229910560

bazel-io pushed a commit that referenced this issue Jan 20, 2019

Automated rollback of commit 56f2b2b.
*** Reason for rollback ***

b/123103413.

*** Original change description ***

C++: Remove more CcLinkParams

Tracking: #4570

Fixes conversion bug from old API to new that was already present before the original CL but was only triggered with it.

RELNOTES:none
PiperOrigin-RevId: 230094550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment