Visual Studio clean and build targets fail
Categories
(Developer Infrastructure :: Developer Environment Integration, task)
Tracking
(firefox99 fixed)
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: mvollmer, Assigned: mvollmer)
Details
Attachments
(1 file, 1 obsolete file)
The generated msvc/mach.bat that is a target of generated Visual Studio projects, calls mach and then keeps exit code of mach. If mach prints a warning, the exit code is 2. Visual Studio however considers any non-zero exit code in a batch file an error condition, and marks the build as failed (even though it succeeded).
The mach.bat gets generated by python/mozbuild/mozbuild/backend/visualstudio.py
Ideally we just add a little bit of extra logic to the generated batch file, that detects exit code 2, overwrites it with 0, and emits a clear warning for the user and Visual Studio to detect.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
The clean target in Visual Studio projects in fact uses an invalid mach command. See also this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1670357
The correct command would be clobber, but that deletes the Visual Studio project files while Visual Studio is running, which it doesn't like too much.
A full build after clobber also causes errors, probably due to the environment not being correctly set:
lld-link: error: <root>: undefined symbol: mainCRTStartup
configure: error: installation or configuration problem: compiler cannot create executables.
Assignee | ||
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
So if a full build did work, then running clobber+build from Visual Studio would work. You'd be pulling the rug from under Visual Studio's feet, and then knit a new one under it before it looks down.
The first step is to fix the clean command (use clobber), update the docs that this is half-broken currently, and keep this bug open on low priority to fix the build environment issue in the future.
Updated•3 years ago
|
Comment 6•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•