Handle stl flags for sdk variant
The three main categories of user-provided stl value are
- "" or "system"
- "libc++"
- "libc++_static"
For each of these values, stl.bzl emits a select statement with an
additional config_setting for sdk
(//build/bazel/rules/apex:unbundled_app). The single select ensures that
non-sdk deps do not get added when building sdk variants.
The implementation choice of using a single select comes at the cost of some
.bzl file verbosity.
Test: b test //build/bazel/rules/cc:stl_tests to verify no regression
for non-sdk variants
Test: Added assertions for sdk variants in sdk_test.bzl
Bug: 201079053
Change-Id: Id0c2b006c61e52b988c2c5fbc1dcd90610f65589
Change-Id: I35c8806a6228ca83218c59601a7b9e68e481e15c
3 files changed