Workaround for compiling .asm files in Visual Studio 2017

This commit is contained in:
Ari Lemmetti 2018-04-06 15:18:08 +03:00
parent f033ad0ad0
commit 6be81959d5
2 changed files with 9 additions and 4 deletions

View file

@ -83,11 +83,13 @@
</Lib>
<YASM>
<Defines>ARCH_X86_64=1;%(Defines)</Defines>
<IncludePaths>$(SolutionDir)..\src\extras;%(IncludePaths);$(SolutionDir)..\src\strategies\x86-asm;</IncludePaths>
</YASM>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<YASM>
<Defines>ARCH_X86_64=0;PREFIX</Defines>
<IncludePaths>$(SolutionDir)..\src\extras;%(IncludePaths);$(SolutionDir)..\src\strategies\x86-asm;</IncludePaths>
</YASM>
<Lib>
<AdditionalLibraryDirectories>$(SolutionDir)..\..\pthreads.2\lib\x86</AdditionalLibraryDirectories>
@ -101,6 +103,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<YASM>
<Defines>ARCH_X86_64=0;PREFIX</Defines>
<IncludePaths>$(SolutionDir)..\src\extras;%(IncludePaths);$(SolutionDir)..\src\strategies\x86-asm;</IncludePaths>
</YASM>
<Lib>
<AdditionalLibraryDirectories>$(SolutionDir)..\..\pthreads.2\lib\x86</AdditionalLibraryDirectories>
@ -114,6 +117,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<YASM>
<Defines>ARCH_X86_64=1;%(Defines)</Defines>
<IncludePaths>$(SolutionDir)..\src\extras;%(IncludePaths);$(SolutionDir)..\src\strategies\x86-asm;</IncludePaths>
</YASM>
<Lib>
<AdditionalLibraryDirectories>$(SolutionDir)..\..\pthreads.2\lib\x64</AdditionalLibraryDirectories>

View file

@ -20,7 +20,7 @@
AfterTargets="$(YASMAfterTargets)"
Condition="'@(YASM)' != ''"
DependsOnTargets="$(YASMDependsOn);ComputeYASMOutput"
Outputs="@(YASM->'%(ObjectFile)')"
Outputs="@(YASM->'$(ProjectDir)$(IntDir)%(Filename).obj')"
Inputs="@(YASM);%(YASM.AdditionalDependencies);$(MSBuildProjectFile)">
<ItemGroup
Condition="'@(SelectedFiles)' != ''">
@ -32,7 +32,7 @@
<YASM_tlog
Include="%(YASM.ObjectFile)"
Condition="'%(YASM.ObjectFile)' != '' and '%(YASM.ExcludedFromBuild)' != 'true'">
<Source>@(YASM, '|')</Source>
<Source>@(YASM->'%(FullPath)', '|')</Source>
</YASM_tlog>
</ItemGroup>
<Message
@ -40,8 +40,9 @@
Text="%(YASM.ExecutionDescription)" />
<WriteLinesToFile
Condition="'@(YASM_tlog)' != '' and '%(YASM_tlog.ExcludedFromBuild)' != 'true'"
File="$(IntDir)$(ProjectName).write.1.tlog"
Lines="^%(YASM_tlog.Source);@(YASM_tlog->'%(Fullpath)')" />
File="$(TLogLocation)$(ProjectName).write.1.tlog"
Lines="^%(YASM_tlog.Source);@(YASM->'$(ProjectDir)$(IntDir)%(Filename).obj')"
Encoding="Unicode" />
<YASM
Condition="'@(YASM)' != '' and '%(YASM.ExcludedFromBuild)' != 'true'"
CommandLineTemplate="%(YASM.CommandLineTemplate)"