bazelbuild / bazelbuild/bazel

Wrong assembler flags in Windows toolchain

Open
#8,924 6 comments 0 reactions 0 assignees View on GitHub
not stale P4 team-Rules-CPP type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 18h
Merged PRs (30d)
75

Description

Please kindly look at a reproduction case here: https://github.com/excitoon/bazel-issues/tree/master/windows-assembler

```
C:\Users\Chebotarev_V\Documents\src\bazel-issues\windows-assembler>bazelisk build ...
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:test (13 packages loaded, 71 targets configured).
INFO: Found 1 target...
INFO: From Compiling 1.asm:
MASM : warning A4018:invalid command-line option : /bigobj
MASM : warning A4018:invalid command-line option : /Zm500
MASM : warning A4018:invalid command-line option : /Z500
MASM : warning A4018:invalid command-line option : /Z00
MASM : warning A4018:invalid command-line option : /Z0
MASM : warning A4018:invalid command-line option : /EHsc
MASM : warning A4018:invalid command-line option : /wd4351
MASM : warning A4018:invalid command-line option : /wd4291
MASM : warning A4018:invalid command-line option : /wd4250
MASM : warning A4018:invalid command-line option : /wd4996
Assembling: 1.asm
Target //:test up-to-date:
bazel-bin/test.exe
INFO: Elapsed time: 14.480s, Critical Path: 0.41s
INFO: 3 processes: 3 local.
INFO: Build completed successfully, 7 total actions
```

### Version

```
C:\Users\Chebotarev_V\Documents\src\bazel-issues\windows-assembler>bazelisk version
Build label: 0.28.0
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Jul 10 16:15:38 2019 (1562775338)
Build timestamp: 1562775338
Build timestamp as int: 1562775338
```

Contributor guide

Open the contributing guide

Research direction

Start by running the reproduction case linked in the issue, windows-assembler, with the reported Bazel 0.28.0 toolchain. Trace where the Windows assembler command is assembled and compare the flags passed to MASM; done means the invalid options shown in the warning output are no longer passed during the build.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.