Skip to content

Commit c41334e

Browse files
authored
Auto merge of servo#29955 - servo:windows-subsystem, r=jdm
Set the Windows subsystem using a rust directive This is one less thing that mach has to do now. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they do not change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2 parents 82b37df + e681e2b commit c41334e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ports/winit/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
//!
1515
//! [winit]: https://github.com/rust-windowing/winit
1616
17+
// Normally, rust uses the "Console" Windows subsystem, which pops up a console
18+
// when running an application. Switching to the "Windows" subsystem prevents
19+
// this, but also hides debugging output. Use the "Windows" console unless debug
20+
// mode is turned on.
21+
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
22+
1723
#[cfg(not(target_os = "android"))]
1824
include!("main2.rs");
1925

python/servo/build_commands.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,6 @@ def build(self, release=False, dev=False, jobs=None, params=None, no_package=Fal
425425
)
426426
assert os.path.exists(servo_exe_dir)
427427

428-
# on msvc builds, use editbin to change the subsystem to windows, but only
429-
# on release builds -- on debug builds, it hides log output
430-
if not dev and not libsimpleservo:
431-
call(["editbin", "/nologo", "/subsystem:windows", path.join(servo_exe_dir, "servo.exe")],
432-
verbose=verbose)
433428
# on msvc, we need to copy in some DLLs in to the servo.exe dir and the directory for unit tests.
434429
for ssl_lib in ["libssl.dll", "libcrypto.dll"]:
435430
ssl_path = path.join(env['OPENSSL_LIB_DIR'], "../bin", ssl_lib)

0 commit comments

Comments
 (0)