From be612cbcea4e74196445940c41b42acb6ffa5ebd Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 3 Oct 2018 14:30:58 -0700 Subject: Implement -arch switch Fixes wixtoolset/issues#5863 --- src/WixToolset.Core/CommandLine/CompileCommand.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/WixToolset.Core/CommandLine/CompileCommand.cs') diff --git a/src/WixToolset.Core/CommandLine/CompileCommand.cs b/src/WixToolset.Core/CommandLine/CompileCommand.cs index ec1ce602..621571b1 100644 --- a/src/WixToolset.Core/CommandLine/CompileCommand.cs +++ b/src/WixToolset.Core/CommandLine/CompileCommand.cs @@ -11,12 +11,13 @@ namespace WixToolset.Core.CommandLine internal class CompileCommand : ICommandLineCommand { - public CompileCommand(IServiceProvider serviceProvider, IEnumerable sources, IDictionary preprocessorVariables) + public CompileCommand(IServiceProvider serviceProvider, IEnumerable sources, IDictionary preprocessorVariables, Platform platform) { this.ServiceProvider = serviceProvider; this.Messaging = serviceProvider.GetService(); this.SourceFiles = sources; this.PreprocessorVariables = preprocessorVariables; + this.Platform = platform; } private IServiceProvider ServiceProvider { get; } @@ -27,6 +28,8 @@ namespace WixToolset.Core.CommandLine private IDictionary PreprocessorVariables { get; } + private Platform Platform { get; } + public IEnumerable IncludeSearchPaths { get; } public int Execute() @@ -56,7 +59,7 @@ namespace WixToolset.Core.CommandLine var compiler = new Compiler(this.ServiceProvider); compiler.OutputPath = sourceFile.OutputPath; - compiler.Platform = Platform.X86; // TODO: set this correctly + compiler.Platform = this.Platform; compiler.SourceDocument = document; var intermediate = compiler.Execute(); -- cgit v1.2.3-55-g6feb