Skip to content
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

Assembler with C preprocessor support seems to be missing for MSVC on Windows #22372

Open
matt-sm opened this issue May 15, 2024 · 0 comments
Open
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: bug

Comments

@matt-sm
Copy link
Contributor

matt-sm commented May 15, 2024

Description of the bug:

To build a .S file on Windows is a 2-step process:

  1. preprocess the .S with cl.exe e.g. cl /EP I. foo.S > foo.asm
  2. then pass the .asm to ml or ml64.exe e.g. ml /Fofoo.obj /c foo.asm

However, building the .S with cc_library seems to only invoke a single step that calls ml.

Corressponding default toolchain config:

https://github.com/bazelbuild/bazel/blob/master/tools/cpp/windows_cc_toolchain_config.bzl#L181

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

cc_library(
     name = "win64_preprocess",
     srcs = [
         ":src/win64.S",
     ],
)

Which operating system are you running Bazel on?

Windows 10

What is the output of bazel info release?

release 7.1.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

This seems to hint .S support does exist: a24d1bc

Meson also had a similar issue: mesonbuild/meson#9889

Any other information, logs, or outputs that you want to share?

No response

@sgowroji sgowroji added the team-Rules-CPP Issues for C++ rules label May 15, 2024
@comius comius added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: bug
Projects
None yet
Development

No branches or pull requests

5 participants