-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Expose ctx.fragments.(copts|cxxopts|conlyopts|linkopts) #5602
Labels
Comments
bazel-io
pushed a commit
that referenced
this issue
Jul 19, 2018
Previous behavior was to put flags coming from Bazel option --linkopt into legacy_link_flags. They should be in user_link_flags instead (together with flags coming from linkopts rule attribute). This cl introduces --experimental_linkopts_in_user_link_flags option that flips the behavior. There is another incompatible change. Previously cc_common.create_link_variables() included flags from --linkopt, with the flag flipped it doesn't anymore. I believe --linkopt flags shouldn't be there by default because: * We don't tie the API with the specifics of C++ rules/options, enabling theoretical use with other languages (objc) * Users are free to use ctx.fragments.cpp to access C++ options and add them explicitly (#5602) * New behavior maintains the symmetry with --copt and user_compile_flags RELNOTES: None. PiperOrigin-RevId: 205274272
werkt
pushed a commit
to werkt/bazel
that referenced
this issue
Aug 2, 2018
Previous behavior was to put flags coming from Bazel option --linkopt into legacy_link_flags. They should be in user_link_flags instead (together with flags coming from linkopts rule attribute). This cl introduces --experimental_linkopts_in_user_link_flags option that flips the behavior. There is another incompatible change. Previously cc_common.create_link_variables() included flags from --linkopt, with the flag flipped it doesn't anymore. I believe --linkopt flags shouldn't be there by default because: * We don't tie the API with the specifics of C++ rules/options, enabling theoretical use with other languages (objc) * Users are free to use ctx.fragments.cpp to access C++ options and add them explicitly (bazelbuild#5602) * New behavior maintains the symmetry with --copt and user_compile_flags RELNOTES: None. PiperOrigin-RevId: 205274272
luca-digrazia
pushed a commit
to luca-digrazia/DatasetCommitsDiffSearch
that referenced
this issue
Sep 4, 2022
Previous behavior was to put flags coming from Bazel option --linkopt into legacy_link_flags. They should be in user_link_flags instead (together with flags coming from linkopts rule attribute). This cl introduces --experimental_linkopts_in_user_link_flags option that flips the behavior. There is another incompatible change. Previously cc_common.create_link_variables() included flags from --linkopt, with the flag flipped it doesn't anymore. I believe --linkopt flags shouldn't be there by default because: * We don't tie the API with the specifics of C++ rules/options, enabling theoretical use with other languages (objc) * Users are free to use ctx.fragments.cpp to access C++ options and add them explicitly (bazelbuild/bazel#5602) * New behavior maintains the symmetry with --copt and user_compile_flags RELNOTES: None. PiperOrigin-RevId: 205274272
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add methods that expose flags passed by --copt (and --cxxopt, --conlyopt) and --linkopt options to CppConfiguration's Skylark API.
This will be useful because:
Since these methods will only return values passed from the Bazel command line, they don't interfere with current efforts removing package loading from configurations.
The text was updated successfully, but these errors were encountered: