Skip to content

Commit 499812e

Browse files
authored
Merge pull request #402 from GabrielMajeri/asm-comments
Enable -Z asm-comments on nightly
2 parents 2cec5c9 + a7ec50b commit 499812e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

ui/src/sandbox.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl Sandbox {
314314
let mut cmd = self.docker_command(Some(crate_type));
315315
set_execution_environment(&mut cmd, Some(target), crate_type, edition, backtrace);
316316

317-
let execution_cmd = build_execution_command(Some(target), mode, crate_type, tests);
317+
let execution_cmd = build_execution_command(Some(target), channel, mode, crate_type, tests);
318318

319319
cmd.arg(&channel.container_name()).args(&execution_cmd);
320320

@@ -327,7 +327,7 @@ impl Sandbox {
327327
let mut cmd = self.docker_command(Some(crate_type));
328328
set_execution_environment(&mut cmd, None, crate_type, edition, backtrace);
329329

330-
let execution_cmd = build_execution_command(None, mode, crate_type, tests);
330+
let execution_cmd = build_execution_command(None, channel, mode, crate_type, tests);
331331

332332
cmd.arg(&channel.container_name()).args(&execution_cmd);
333333

@@ -412,7 +412,7 @@ fn basic_secure_docker_command() -> Command {
412412
cmd
413413
}
414414

415-
fn build_execution_command(target: Option<CompileTarget>, mode: Mode, crate_type: CrateType, tests: bool) -> Vec<&'static str> {
415+
fn build_execution_command(target: Option<CompileTarget>, channel: Channel, mode: Mode, crate_type: CrateType, tests: bool) -> Vec<&'static str> {
416416
use self::CompileTarget::*;
417417
use self::CrateType::*;
418418
use self::Mode::*;
@@ -440,6 +440,12 @@ fn build_execution_command(target: Option<CompileTarget>, mode: Mode, crate_type
440440

441441
cmd.push("--emit=asm");
442442

443+
// Enable extra assembly comments for nightly builds
444+
if let Channel::Nightly = channel {
445+
cmd.push("-Z");
446+
cmd.push("asm-comments");
447+
}
448+
443449
cmd.push("-C");
444450
match flavor {
445451
Att => cmd.push("llvm-args=-x86-asm-syntax=att"),

0 commit comments

Comments
 (0)