--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAGCAkix6NL%2Bj6LGo8-5axWW_w1hpEbg70fMxr14wcRaMK%2BUYSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi Jerry,afaik this is not possible today. If there are no circular deps between objects then splitting into multiple (objc|cc)_libraries is the right solution. We are currently discussing smth related, we might write a design doc soon-ish, but it's very unlikely that we will implement it before https://github.com/bazelbuild/bazel/issues/4570 is fixed.
On Wed, May 2, 2018 at 10:46 PM 'Jerry Marino' via bazel-discuss <bazel-discuss@googlegroups.com> wrote:
Hello,I'd like the ability to set language specific copts, for C, ObjC, and C++ files in a given objc_library.This issue is that I've got some large libraries:objc_libary(name = "some",srcs = [ A.c, B.m, C.mm, D.cxx, ... ])But some of the C++ code needs compiler options that are not compatible with ObjC.Under Xcode, it is possible to set CLANG_CXX_LANGUAGE_STANDARD and CLANG_CXX_LIBRARY, and OTHER_CPLUSPLUS at the library level. These flags are conditionally applied based on language / file type.Is there a way to achieve this other than creating a library for each language?Thanks,Jerry
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAGCAkix6NL%2Bj6LGo8-5axWW_w1hpEbg70fMxr14wcRaMK%2BUYSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hey Marcel,Thanks for clarifying this, Sir!For context, a few CocoaPods are leveraging CLANG_CXX_LANGUAGE_STANDARD and there is no telling what the user defined targets will look like in CocoaPods. Unfortunately, the CocoaPod spec relies on this behavior of Xcode in order for it to work. If we aren't transitively building / linking all of the static archives, I think splitting out the C++ files will generalize to arbitrary inputs.BTW, we probably need to do the same splitting logic for swift_library so I'm not too reluctant to implement this in PodToBUILD.Much appreciated!Jerry
On Wed, May 2, 2018 at 10:33 PM, Marcel Hlopko <hlo...@google.com> wrote:
Hi Jerry,afaik this is not possible today. If there are no circular deps between objects then splitting into multiple (objc|cc)_libraries is the right solution. We are currently discussing smth related, we might write a design doc soon-ish, but it's very unlikely that we will implement it before https://github.com/bazelbuild/bazel/issues/4570 is fixed.
On Wed, May 2, 2018 at 10:46 PM 'Jerry Marino' via bazel-discuss <bazel-...@googlegroups.com> wrote:
Hello,I'd like the ability to set language specific copts, for C, ObjC, and C++ files in a given objc_library.This issue is that I've got some large libraries:objc_libary(name = "some",srcs = [ A.c, B.m, C.mm, D.cxx, ... ])But some of the C++ code needs compiler options that are not compatible with ObjC.Under Xcode, it is possible to set CLANG_CXX_LANGUAGE_STANDARD and CLANG_CXX_LIBRARY, and OTHER_CPLUSPLUS at the library level. These flags are conditionally applied based on language / file type.Is there a way to achieve this other than creating a library for each language?Thanks,Jerry
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAGCAkix6NL%2Bj6LGo8-5axWW_w1hpEbg70fMxr14wcRaMK%2BUYSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Marcel Hlopko | Software Engineer | hlo...@google.com |Google Germany GmbH | Erika-Mann-Str. 33 | 80636 München | Germany | Geschäftsführer: Geschäftsführer: Paul Manicle, Halimah DeLaine Prado | Registergericht und -nummer: Hamburg, HRB 86891
Thanks for the clarification. It's slightly more complicated than just setting a copt, as bazel compiles files differently when it knows it's a C++ file vs ObjC file or C file. Also (new) crosstool can differentiate between them (c-compile vs c++-compile vs objc-compile vs objc++-compile action_configs). Is it an option for you to create a custom crosstool that adds a feature that you can enable for the target, that only applies to specific filetype? In other words, can *all* C++ files in the target be compiled with the copt in question?If you have no idea what action_config and feature in the crosstool mean, I apologize, there is exactly zero documentation about this. This will change in Q2 or early Q3.
On Wed, May 9, 2018 at 3:22 AM Jerry Marino <jerry...@pinterest.com> wrote:
Hey Marcel,Thanks for clarifying this, Sir!For context, a few CocoaPods are leveraging CLANG_CXX_LANGUAGE_STANDARD and there is no telling what the user defined targets will look like in CocoaPods. Unfortunately, the CocoaPod spec relies on this behavior of Xcode in order for it to work. If we aren't transitively building / linking all of the static archives, I think splitting out the C++ files will generalize to arbitrary inputs.BTW, we probably need to do the same splitting logic for swift_library so I'm not too reluctant to implement this in PodToBUILD.Much appreciated!Jerry
On Wed, May 2, 2018 at 10:33 PM, Marcel Hlopko <hlo...@google.com> wrote:
Hi Jerry,afaik this is not possible today. If there are no circular deps between objects then splitting into multiple (objc|cc)_libraries is the right solution. We are currently discussing smth related, we might write a design doc soon-ish, but it's very unlikely that we will implement it before https://github.com/bazelbuild/bazel/issues/4570 is fixed.
On Wed, May 2, 2018 at 10:46 PM 'Jerry Marino' via bazel-discuss <bazel-discuss@googlegroups.com> wrote:
Hello,I'd like the ability to set language specific copts, for C, ObjC, and C++ files in a given objc_library.This issue is that I've got some large libraries:objc_libary(name = "some",srcs = [ A.c, B.m, C.mm, D.cxx, ... ])But some of the C++ code needs compiler options that are not compatible with ObjC.Under Xcode, it is possible to set CLANG_CXX_LANGUAGE_STANDARD and CLANG_CXX_LIBRARY, and OTHER_CPLUSPLUS at the library level. These flags are conditionally applied based on language / file type.Is there a way to achieve this other than creating a library for each language?Thanks,Jerry
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAGCAkix6NL%2Bj6LGo8-5axWW_w1hpEbg70fMxr14wcRaMK%2BUYSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--Marcel Hlopko | Software Engineer | hlo...@google.com |Google Germany GmbH | Erika-Mann-Str. 33 | 80636 München | Germany | Geschäftsführer: Geschäftsführer: Paul Manicle, Halimah DeLaine Prado | Registergericht und -nummer: Hamburg, HRB 86891
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAOBFCepspYvRD1bNt%2BK%3DcnqECUAmjXUCE842wtZfL_ORKSND%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.