Skip to content

Remove -DCOMPILER_MSVC from CROSSTOOL #5351

Closed

Description

@rongjiecomputer

Description of the problem / feature request:

Remove COMPILER_MSVC macro from CROSSTOOL.

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

Build system should define as little flags as possible so that it does not conflict with existing projects.

Potential Risk

As far as I know, Google projects are the only projects that use this macro. Most Google projects open-sourced before Bazel either use _MSC_VER directly or define COMPILER_MSVC in header file (which will cause macro redefinition warning if you use Bazel). The usage of this macro in Tensorflow was removed in tensorflow/tensorflow#18448.

Plan

  1. Remove usage of COMPILER_MSVC in Bazel (Remove usage of COMPILER_MSVC in Bazel and ijar #5350).
  2. Update third_party/protobuf from 3.4.0 to 3.6.0 (released this week with many MSVC fixes, including removing some COMPILER_MSVC). Best left this for the Bazel team.
  3. Remove -DCOMPILER_MSVC from CROSSTOOL.

Activity

  1. added
    P2
    on Jun 8, 2018
  2. meteorcloudy commented on Jun 8, 2018

    @meteorcloudy
    Member

    @rongjiecomputer Thanks for this suggestion, we'll remove COMPILER_MSVC once no one depends on it.

  3. rongjiecomputer commented on Jun 18, 2018

    @rongjiecomputer
    ContributorAuthor

    @meteorcloudy Is it OK for external contributor to update third_party/protobuf? The folder has a README file detailing how to update protobuf for Bazel, so this should be fairly simple.

    As a side question, is there any reason/benefit for not building Protobuf Java from source when bootstrapping Bazel?

  4. meteorcloudy commented on Jun 18, 2018

    @meteorcloudy
    Member

    @buchgr Can you help answer the above questions?

  5. meteorcloudy commented on Jun 18, 2018

    @meteorcloudy
    Member

    @rongjiecomputer BTW, protobuf 3.6 hasn't been released yet, right? So we might want to wait for the official release.

  6. rongjiecomputer commented on Jun 18, 2018

    @rongjiecomputer
    ContributorAuthor

    @meteorcloudy protobuf 3.6.0 was released 12 days ago after 3.6.0rc1 and 3.6.0rc2. See the updated changelog (the changelog was only updated in 3.6.x branch, not merged back to master branch yet for some reason).

    protobuf 3.6.0.1 was also released 10 days ago with some minor fixes.

  7. meteorcloudy commented on Jun 20, 2018

    @meteorcloudy
    Member

    They just had a complete release today. https://github.com/google/protobuf/releases/tag/v3.6.0 \o/

    @buchgr Can we update protobuf version to 3.6? Is it OK for external contributor to do that?

  8. buchgr commented on Jun 20, 2018

    @buchgr
    Contributor

    absolutely, if you get stuck just ping me! looking forward to the new protobuf :-)

  9. added
    team-Configurability
    and removed on Dec 4, 2018
  10. aiuto commented on Jun 8, 2020

    @aiuto

    We updated protobuf beyond this a long time ago. I'm trying a PR to remove the defines.

  11. aiuto commented on Oct 6, 2021

    @aiuto

    Fixed by protobuf update and 121f6c7

  12. added a commit that references this issue on Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2platform: windowsteam-Configurabilitytype: feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions