|
|
|
@ -16,8 +16,6 @@
|
|
|
|
|
<StrideNativeToolingDebug></StrideNativeToolingDebug>
|
|
|
|
|
|
|
|
|
|
<StrideNativeClang>$(StrideNativeToolingDebug) -Wno-ignored-attributes -Wno-delete-non-virtual-dtor -Wno-macro-redefined -I"$(MSBuildThisFileDirectory)..\..\deps\\NativePath" -I"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\standard"</StrideNativeClang>
|
|
|
|
|
<StrideNativeClang Condition="'$(StridePlatform)' == 'Linux'">$(StrideNativeClang) -DPLATFORM_LINUX</StrideNativeClang>
|
|
|
|
|
<StrideNativeClang Condition="'$(StridePlatform)' == 'macOS'">$(StrideNativeClang) -DPLATFORM_MACOS</StrideNativeClang>
|
|
|
|
|
<StrideNativeClangCPP>-std=c++11 -fno-rtti -fno-exceptions</StrideNativeClangCPP>
|
|
|
|
|
|
|
|
|
|
<!--<StrideNativeOutputPath>$([MSBuild]::MakeRelative('$(OutputPath)', '$(StridePackageStridePlatformBin)\'))</StrideNativeOutputPath>-->
|
|
|
|
@ -25,7 +23,7 @@
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<Choose>
|
|
|
|
|
<When Condition="('$(StridePlatform)' == 'UWP')">
|
|
|
|
|
<When Condition="'$(TargetFramework)' == '$(StrideFrameworkUWP)'">
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<StrideNativeClang Condition="'$(Configuration)' == 'Debug'">$(StrideNativeClang) -Od</StrideNativeClang>
|
|
|
|
|
<StrideNativeClang Condition="'$(Configuration)' == 'Release'">$(StrideNativeClang) -O2</StrideNativeClang>
|
|
|
|
@ -38,36 +36,31 @@
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
</Otherwise>
|
|
|
|
|
</Choose>
|
|
|
|
|
|
|
|
|
|
<!-- Define NEED_DLL_EXPORT for platforms that requires it. -->
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<StrideNativeClang Condition=" '$(StridePlatform)' == 'Windows' OR '$(StridePlatform)' == 'UWP' ">$(StrideNativeClang) -DNEED_DLL_EXPORT</StrideNativeClang>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<!-- Define default CPU architectures -->
|
|
|
|
|
<ItemGroup Condition="'$(TargetFramework)' == '$(StrideFramework)'">
|
|
|
|
|
<StrideNativeCPU Include="win-x64;win-x86" LibraryExtension=".dll" LibraryRuntime="win" />
|
|
|
|
|
<StrideNativeCPU Include="linux-x64" LibraryExtension=".so" LibraryRuntime="linux" />
|
|
|
|
|
<StrideNativeCPU Include="osx-x64" LibraryExtension=".dylib" LibraryRuntime="osx" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<ItemGroup Condition="'$(TargetFramework)' == '$(StrideFrameworkAndroid)'">
|
|
|
|
|
<StrideNativeCPU Include="arm64-v8a;armeabi-v7a;x86;x86_64" LibraryExtension=".so" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<ItemGroup Condition="'$(TargetFramework)' == '$(StrideFrameworkiOS)'">
|
|
|
|
|
<StrideNativeCPU Include="top" LibraryExtension=".a" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<ItemGroup Condition="'$(TargetFramework)' == '$(StrideFrameworkUWP)'">
|
|
|
|
|
<StrideNativeCPU Include="x86;x64;ARM" LibraryExtension=".dll" />
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<StrideNativeCPU Condition=" '$(StridePlatform)' == 'Windows' " Include="win-x64;win-x86"/>
|
|
|
|
|
<StrideNativeCPU Condition=" '$(StridePlatform)' == 'Linux' " Include="linux-x64"/>
|
|
|
|
|
<StrideNativeCPU Condition=" '$(StridePlatform)' == 'macOS' " Include="osx-x64"/>
|
|
|
|
|
<StrideNativeCPU Condition=" '$(StridePlatform)' == 'UWP' " Include="x86;x64;ARM"/>
|
|
|
|
|
<StrideNativeCPU Condition=" '$(StridePlatform)' == 'Android' " Include="arm64-v8a;armeabi-v7a;x86;x86_64"/>
|
|
|
|
|
<StrideNativeCPU Update="@(StrideNativeCPU)">
|
|
|
|
|
<LibraryOutputDirectory Condition="'%(Identity)' != 'top'">%(Identity)\</LibraryOutputDirectory>
|
|
|
|
|
</StrideNativeCPU>
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<!-- Define default dynamic library extensions -->
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<StrideNativeLibraryTargetExt Condition=" '$(StridePlatform)' == 'Windows' Or '$(StridePlatform)' == 'UWP' ">.dll</StrideNativeLibraryTargetExt>
|
|
|
|
|
<StrideNativeLibraryTargetExt Condition=" '$(StridePlatform)' == 'Android' Or '$(StridePlatform)' == 'Linux' ">.so</StrideNativeLibraryTargetExt>
|
|
|
|
|
<StrideNativeLibraryTargetExt Condition=" '$(StridePlatform)' == 'macOS' ">.dylib</StrideNativeLibraryTargetExt>
|
|
|
|
|
<StrideNativeLibraryTargetExt Condition=" '$(StridePlatform)' == 'iOS' ">.a</StrideNativeLibraryTargetExt>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<!-- Sepcial case: no CPU-specific libraries, output at top level -->
|
|
|
|
|
<_StrideNativeOutput Condition="'@(StrideNativeCPU)'==''" Include="$(StrideNativeOutputName)$(StrideNativeLibraryTargetExt)">
|
|
|
|
|
<RelativePath>%(Identity)</RelativePath>
|
|
|
|
|
</_StrideNativeOutput>
|
|
|
|
|
<!-- One output file per CPU -->
|
|
|
|
|
<_StrideNativeOutput Include="@(StrideNativeCPU->'%(Identity)\$(StrideNativeOutputName)$(StrideNativeLibraryTargetExt)')">
|
|
|
|
|
<_StrideNativeOutput Include="@(StrideNativeCPU->'%(LibraryOutputDirectory)$(StrideNativeOutputName)%(LibraryExtension)')">
|
|
|
|
|
<RelativePath>%(Identity)</RelativePath>
|
|
|
|
|
</_StrideNativeOutput>
|
|
|
|
|
</ItemGroup>
|
|
|
|
@ -122,39 +115,39 @@
|
|
|
|
|
<Touch AlwaysCreate="true" Files="$(OutputPath)\$(StrideNativeOutputName).ss_native"/>
|
|
|
|
|
</Target>-->
|
|
|
|
|
|
|
|
|
|
<Target Name="CompileNativeClang_Windows" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="'$(StridePlatform)' == 'Windows' And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<Target Name="CompileNativeClang_Windows" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="('$(TargetFramework)' == '$(StrideFramework)') And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<MakeDir Directories="$(OutputObjectPath)\win-x86"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" -gcodeview -fno-ms-extensions -nobuiltininc -nostdinc++ $(StrideNativeClang) -o "$(OutputObjectPath)\win-x86\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -fms-extensions -DWINDOWS_DESKTOP -target i686-pc-windows-msvc" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" -gcodeview -fno-ms-extensions -nobuiltininc -nostdinc++ $(StrideNativeClangCPP) $(StrideNativeClang) -o "$(OutputObjectPath)\win-x86\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -fms-extensions -DWINDOWS_DESKTOP -target i686-pc-windows-msvc" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" -gcodeview -fno-ms-extensions -nobuiltininc -nostdinc++ $(StrideNativeClang) -DNEED_DLL_EXPORT -o "$(OutputObjectPath)\win-x86\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -fms-extensions -DWINDOWS_DESKTOP -target i686-pc-windows-msvc" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" -gcodeview -fno-ms-extensions -nobuiltininc -nostdinc++ $(StrideNativeClangCPP) $(StrideNativeClang) -DNEED_DLL_EXPORT -o "$(OutputObjectPath)\win-x86\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -fms-extensions -DWINDOWS_DESKTOP -target i686-pc-windows-msvc" />
|
|
|
|
|
<MSBuild Projects="$(MSBuildThisFileDirectory)WindowsProjects\WindowsDesktop\WindowsDesktop.vcxproj" Targets="Build" Properties="StrideNativeOutputName=$(StrideNativeOutputName);StrideNativeOutputDir=$(StrideNativeOutputPath)\win-x86;StrideDependenciesDir=$(MSBuildThisFileDirectory)..\..\deps\;StrideNativePathLibs=libNativePath.lib $(StrideNativePathLibs);StrideNativeProjectFolder=$(ProjectDir);StrideNativeProjectObjFolder=$(OutputObjectPath)\win-x86;Configuration=$(Configuration);Platform=x86" StopOnFirstFailure="true" />
|
|
|
|
|
|
|
|
|
|
<MakeDir Directories="$(OutputObjectPath)\win-x64"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" -gcodeview -fno-ms-extensions -nobuiltininc -nostdinc++ $(StrideNativeClang) -o "$(OutputObjectPath)\win-x64\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -fms-extensions -DWINDOWS_DESKTOP -target x86_64-pc-windows-msvc" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" -gcodeview -fno-ms-extensions -nobuiltininc -nostdinc++ $(StrideNativeClangCPP) $(StrideNativeClang) -o "$(OutputObjectPath)\win-x64\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -fms-extensions -DWINDOWS_DESKTOP -target x86_64-pc-windows-msvc" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" -gcodeview -fno-ms-extensions -nobuiltininc -nostdinc++ $(StrideNativeClang) -DNEED_DLL_EXPORT -o "$(OutputObjectPath)\win-x64\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -fms-extensions -DWINDOWS_DESKTOP -target x86_64-pc-windows-msvc" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" -gcodeview -fno-ms-extensions -nobuiltininc -nostdinc++ $(StrideNativeClangCPP) $(StrideNativeClang) -DNEED_DLL_EXPORT -o "$(OutputObjectPath)\win-x64\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -fms-extensions -DWINDOWS_DESKTOP -target x86_64-pc-windows-msvc" />
|
|
|
|
|
<MSBuild Projects="$(MSBuildThisFileDirectory)WindowsProjects\WindowsDesktop\WindowsDesktop.vcxproj" Targets="Build" Properties="StrideNativeOutputName=$(StrideNativeOutputName);StrideNativeOutputDir=$(StrideNativeOutputPath)\win-x64;StrideDependenciesDir=$(MSBuildThisFileDirectory)..\..\deps\;StrideNativePathLibs=libNativePath.lib $(StrideNativePathLibs);StrideNativeProjectFolder=$(ProjectDir);StrideNativeProjectObjFolder=$(OutputObjectPath)\win-x64;Configuration=$(Configuration);Platform=x64" StopOnFirstFailure="true" />
|
|
|
|
|
|
|
|
|
|
<!-- Workaround: forcing C# rebuild so that timestamp are up to date (ideally we should have separate input/output groups for C# and Native) -->
|
|
|
|
|
<Delete Files="@(IntermediateAssembly)"/>
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
<Target Name="CompileNativeClang_UWP" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="'$(StridePlatform)' == 'UWP' And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<Target Name="CompileNativeClang_UWP" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="'$(TargetFramework)' == '$(StrideFrameworkUWP)' And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<MakeDir Directories="$(OutputObjectPath)\x86"/>
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang-cl.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\x86\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -WX -GS- -MD -DUWP -m32" />
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang-cl.exe" $(StrideNativeClang) -DNEED_DLL_EXPORT -o "$(OutputObjectPath)\x86\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -WX -GS- -MD -DUWP -m32" />
|
|
|
|
|
<MSBuild Projects="$(MSBuildThisFileDirectory)WindowsProjects\UWP\UWP.vcxproj" Targets="Build" Properties="StrideNativeOutputName=$(StrideNativeOutputName);StrideNativeOutputDir=$(StrideNativeOutputPath)\x86;StrideDependenciesDir=$(MSBuildThisFileDirectory)..\..\deps\;StrideNativePathLibs=libNativePath.lib $(StrideNativePathLibs);StrideNativeProjectFolder=$(ProjectDir);StrideNativeProjectObjFolder=$(OutputObjectPath)\x86;Configuration=$(Configuration);Platform=x86" StopOnFirstFailure="true" />
|
|
|
|
|
|
|
|
|
|
<MakeDir Directories="$(OutputObjectPath)\x64"/>
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang-cl.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\x64\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -WX -GS- -MD -DUWP -m64" />
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang-cl.exe" $(StrideNativeClang) -DNEED_DLL_EXPORT -o "$(OutputObjectPath)\x64\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -WX -GS- -MD -DUWP -m64" />
|
|
|
|
|
<MSBuild Projects="$(MSBuildThisFileDirectory)WindowsProjects\UWP\UWP.vcxproj" Targets="Build" Properties="StrideNativeOutputName=$(StrideNativeOutputName);StrideNativeOutputDir=$(StrideNativeOutputPath)\x64;StrideDependenciesDir=$(MSBuildThisFileDirectory)..\..\deps\;StrideNativePathLibs=libNativePath.lib $(StrideNativePathLibs);StrideNativeProjectFolder=$(ProjectDir);StrideNativeProjectObjFolder=$(OutputObjectPath)\x64;Configuration=$(Configuration);Platform=x64" StopOnFirstFailure="true" />
|
|
|
|
|
|
|
|
|
|
<MakeDir Directories="$(OutputObjectPath)\ARM"/>
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang-cl.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\ARM\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -WX -GS- -MD -DUWP -m32 --target=thumbv7-windows-msvc" />
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang-cl.exe" $(StrideNativeClang) -DNEED_DLL_EXPORT -o "$(OutputObjectPath)\ARM\%(StrideNativeCFile.Filename).obj" -c "%(StrideNativeCFile.FullPath)" -WX -GS- -MD -DUWP -m32 --target=thumbv7-windows-msvc" />
|
|
|
|
|
<MSBuild Projects="$(MSBuildThisFileDirectory)WindowsProjects\UWP\UWP.vcxproj" Targets="Build" Properties="StrideNativeOutputName=$(StrideNativeOutputName);StrideNativeOutputDir=$(StrideNativeOutputPath)\ARM;StrideDependenciesDir=$(MSBuildThisFileDirectory)..\..\deps\;StrideNativePathLibs=libNativePath.lib $(StrideNativePathLibs);StrideNativeProjectFolder=$(ProjectDir);StrideNativeProjectObjFolder=$(OutputObjectPath)\ARM;Configuration=$(Configuration);Platform=ARM" StopOnFirstFailure="true" />
|
|
|
|
|
|
|
|
|
|
<!-- Workaround: forcing C# rebuild so that timestamp are up to date (ideally we should have separate input/output groups for C# and Native) -->
|
|
|
|
|
<Delete Files="@(IntermediateAssembly)"/>
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
<Target Name="CompileNativeClang_iOS" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="'$(StridePlatform)' == 'iOS' And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<Target Name="CompileNativeClang_iOS" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="'$(TargetFramework)' == '$(StrideFrameworkiOS)' And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_armv7.o" -c "%(StrideNativeCFile.FullPath)" -DIOS -mios-version-min=6.0 -target armv7-apple-ios" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClangCPP) $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_armv7.o" -c "%(StrideNativeCFile.FullPath)" -DIOS -mios-version-min=6.0 -target armv7-apple-ios" />
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\llvm-ar.exe" rcs -format=bsd "$(OutputObjectPath)\$(StrideNativeOutputName)_armv7.a" @(StrideNativeCFile->'"$(OutputObjectPath)\%(Filename)_armv7.o"', ' ')" />
|
|
|
|
@ -190,11 +183,11 @@
|
|
|
|
|
<Delete Files="@(IntermediateAssembly)"/>
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
<Target Name="CompileNativeClang_iOS_Clean" Condition="'$(StridePlatform)' == 'iOS'" BeforeTargets="Clean">
|
|
|
|
|
<Target Name="CompileNativeClang_iOS_Clean" Condition="'$(TargetFramework)' == '$(StrideFrameworkiOS)'" BeforeTargets="Clean">
|
|
|
|
|
<Delete Files="@(StrideNativePathLibs2->'$(StrideNativeOutputPath)\%(Filename).a', ' ')" />
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
<Target Name="CompileNativeClang_Android" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="'$(StridePlatform)' == 'Android' And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<Target Name="CompileNativeClang_Android" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="'$(TargetFramework)' == '$(StrideFrameworkAndroid)' And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<Error Text="The AndroidNdkDirectory environment variable is not set!" Condition="'$(AndroidNdkDirectory)' == ''" />
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<StrideNativeAndroidClang>-lc++abi -lm --sysroot="$(AndroidNdkDirectory)\toolchains\llvm\prebuilt\windows-x86_64\sysroot"</StrideNativeAndroidClang>
|
|
|
|
@ -214,42 +207,44 @@
|
|
|
|
|
<MakeDir Directories="$(StrideNativeOutputPath)\armeabi-v7a"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_armeabi-v7a.o" -c "%(StrideNativeCFile.FullPath)" -DANDROID -fPIC --target=armv7-linux-android$(StrideNativeAndroidPlatformVersion32)" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClangCPP) $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_armeabi-v7a.o" -c "%(StrideNativeCFile.FullPath)" -DANDROID -fPIC --target=armv7-linux-android$(StrideNativeAndroidPlatformVersion32)" />
|
|
|
|
|
<Exec Command=""$(AndroidNdkDirectory)\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe" $(StrideNativeToolingDebug) -shared -o "$(StrideNativeOutputPath)\armeabi-v7a\$(StrideNativeOutputName)$(StrideNativeLibraryTargetExt)" @(StrideNativeCFile->'"$(OutputObjectPath)\%(Filename)_armeabi-v7a.o"', ' ') --sysroot="$(AndroidNdkDirectory)\platforms\android-9\arch-arm" @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\armeabi-v7a\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\armeabi-v7a\libNativePath.a" $(StrideNativeAndroidClang) --target=armv7-linux-android$(StrideNativeAndroidPlatformVersion32)" />
|
|
|
|
|
<Exec Command=""$(AndroidNdkDirectory)\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe" $(StrideNativeToolingDebug) -shared -o "$(StrideNativeOutputPath)\armeabi-v7a\$(StrideNativeOutputName).so" @(StrideNativeCFile->'"$(OutputObjectPath)\%(Filename)_armeabi-v7a.o"', ' ') --sysroot="$(AndroidNdkDirectory)\platforms\android-9\arch-arm" @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\armeabi-v7a\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\armeabi-v7a\libNativePath.a" $(StrideNativeAndroidClang) --target=armv7-linux-android$(StrideNativeAndroidPlatformVersion32)" />
|
|
|
|
|
|
|
|
|
|
<MakeDir Directories="$(StrideNativeOutputPath)\arm64-v8a"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_arm64-v8a.o" -c "%(StrideNativeCFile.FullPath)" -DANDROID -fPIC --target=aarch64-linux-android$(StrideNativeAndroidPlatformVersion64)" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClangCPP) $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_arm64-v8a.o" -c "%(StrideNativeCFile.FullPath)" -DANDROID -fPIC --target=aarch64-linux-android$(StrideNativeAndroidPlatformVersion64)" />
|
|
|
|
|
<Exec Command=""$(AndroidNdkDirectory)\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe" $(StrideNativeToolingDebug) -shared -o "$(StrideNativeOutputPath)\arm64-v8a\$(StrideNativeOutputName)$(StrideNativeLibraryTargetExt)" @(StrideNativeCFile->'"$(OutputObjectPath)\%(Filename)_arm64-v8a.o"', ' ') --sysroot="$(AndroidNdkDirectory)\platforms\android-21\arch-arm64" @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\arm64-v8a\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\arm64-v8a\libNativePath.a" $(StrideNativeAndroidClang) --target=aarch64-linux-android$(StrideNativeAndroidPlatformVersion64)" />
|
|
|
|
|
<Exec Command=""$(AndroidNdkDirectory)\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe" $(StrideNativeToolingDebug) -shared -o "$(StrideNativeOutputPath)\arm64-v8a\$(StrideNativeOutputName).so" @(StrideNativeCFile->'"$(OutputObjectPath)\%(Filename)_arm64-v8a.o"', ' ') --sysroot="$(AndroidNdkDirectory)\platforms\android-21\arch-arm64" @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\arm64-v8a\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\arm64-v8a\libNativePath.a" $(StrideNativeAndroidClang) --target=aarch64-linux-android$(StrideNativeAndroidPlatformVersion64)" />
|
|
|
|
|
|
|
|
|
|
<MakeDir Directories="$(StrideNativeOutputPath)\x86"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_x86.o" -c "%(StrideNativeCFile.FullPath)" -DANDROID -fPIC --target=i386-linux-android$(StrideNativeAndroidPlatformVersion32)" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClangCPP) $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_x86.o" -c "%(StrideNativeCFile.FullPath)" -DANDROID -fPIC --target=i386-linux-android$(StrideNativeAndroidPlatformVersion32)" />
|
|
|
|
|
<Exec Command=""$(AndroidNdkDirectory)\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe" $(StrideNativeToolingDebug) -shared -o "$(StrideNativeOutputPath)\x86\$(StrideNativeOutputName)$(StrideNativeLibraryTargetExt)" @(StrideNativeCFile->'"$(OutputObjectPath)\%(Filename)_x86.o"', ' ') --sysroot="$(AndroidNdkDirectory)\platforms\android-9\arch-x86" @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\x86\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\x86\libNativePath.a" $(StrideNativeAndroidClang) --target=i386-linux-android$(StrideNativeAndroidPlatformVersion32)" />
|
|
|
|
|
<Exec Command=""$(AndroidNdkDirectory)\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe" $(StrideNativeToolingDebug) -shared -o "$(StrideNativeOutputPath)\x86\$(StrideNativeOutputName).so" @(StrideNativeCFile->'"$(OutputObjectPath)\%(Filename)_x86.o"', ' ') --sysroot="$(AndroidNdkDirectory)\platforms\android-9\arch-x86" @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\x86\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\x86\libNativePath.a" $(StrideNativeAndroidClang) --target=i386-linux-android$(StrideNativeAndroidPlatformVersion32)" />
|
|
|
|
|
|
|
|
|
|
<MakeDir Directories="$(StrideNativeOutputPath)\x86_64"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_x86_64.o" -c "%(StrideNativeCFile.FullPath)" -DANDROID -fPIC --target=x86_64-linux-android$(StrideNativeAndroidPlatformVersion64)" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClangCPP) $(StrideNativeClang) -o "$(OutputObjectPath)\%(StrideNativeCFile.Filename)_x86_64.o" -c "%(StrideNativeCFile.FullPath)" -DANDROID -fPIC --target=x86_64-linux-android$(StrideNativeAndroidPlatformVersion64)" />
|
|
|
|
|
<Exec Command=""$(AndroidNdkDirectory)\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe" $(StrideNativeToolingDebug) -shared -o "$(StrideNativeOutputPath)\x86_64\$(StrideNativeOutputName)$(StrideNativeLibraryTargetExt)" @(StrideNativeCFile->'"$(OutputObjectPath)\%(Filename)_x86_64.o"', ' ') --sysroot="$(AndroidNdkDirectory)\platforms\android-21\arch-x86_64" @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\x86_64\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\x86_64\libNativePath.a" $(StrideNativeAndroidClang) --target=x86_64-linux-android$(StrideNativeAndroidPlatformVersion64)" />
|
|
|
|
|
<Exec Command=""$(AndroidNdkDirectory)\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe" $(StrideNativeToolingDebug) -shared -o "$(StrideNativeOutputPath)\x86_64\$(StrideNativeOutputName).so" @(StrideNativeCFile->'"$(OutputObjectPath)\%(Filename)_x86_64.o"', ' ') --sysroot="$(AndroidNdkDirectory)\platforms\android-21\arch-x86_64" @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\x86_64\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\Android\x86_64\libNativePath.a" $(StrideNativeAndroidClang) --target=x86_64-linux-android$(StrideNativeAndroidPlatformVersion64)" />
|
|
|
|
|
|
|
|
|
|
<!-- Workaround: forcing C# rebuild so that timestamp are up to date (ideally we should have separate input/output groups for C# and Native) -->
|
|
|
|
|
<Delete Files="@(IntermediateAssembly)"/>
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
<Target Name="CompileNativeClang_Linux" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="'$(StridePlatform)' == 'Linux' And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<Target Name="CompileNativeClang_Linux" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="('$(TargetFramework)' == '$(StrideFramework)') And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<MakeDir Directories="$(OutputObjectPath)\linux-x64"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\linux-x64\%(StrideNativeCFile.Filename)_x64.o" -c "%(StrideNativeCFile.FullPath)" -fPIC -target x86_64-linux-gnu" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClangCPP) $(StrideNativeClang) -o "$(OutputObjectPath)\linux-x64\%(StrideNativeCFile.Filename)_x64.o" -c "%(StrideNativeCFile.FullPath)" -fPIC -target x86_64-linux-gnu" />
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\lld.exe" -flavor gnu --eh-frame-hdr -m elf_x86_64 -shared -o "$(StrideNativeOutputPath)\$(StrideNativeOutputName)$(StrideNativeLibraryTargetExt)" @(StrideNativeCFile->'"$(OutputObjectPath)\linux-x64\%(Filename)_x64.o"', ' ') @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\dotnet\linux-x64\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\dotnet\linux-x64\libNativePath.a"" />
|
|
|
|
|
<MakeDir Directories="$(StrideNativeOutputPath)\linux-x64"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClang) -DPLATFORM_LINUX -o "$(OutputObjectPath)\linux-x64\%(StrideNativeCFile.Filename)_x64.o" -c "%(StrideNativeCFile.FullPath)" -fPIC -target x86_64-linux-gnu" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClangCPP) $(StrideNativeClang) -DPLATFORM_LINUX -o "$(OutputObjectPath)\linux-x64\%(StrideNativeCFile.Filename)_x64.o" -c "%(StrideNativeCFile.FullPath)" -fPIC -target x86_64-linux-gnu" />
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\lld.exe" -flavor gnu --eh-frame-hdr -m elf_x86_64 -shared -o "$(StrideNativeOutputPath)\linux-x64\$(StrideNativeOutputName).so" @(StrideNativeCFile->'"$(OutputObjectPath)\linux-x64\%(Filename)_x64.o"', ' ') @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\\NativePath\dotnet\linux-x64\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\\NativePath\dotnet\linux-x64\libNativePath.a"" />
|
|
|
|
|
|
|
|
|
|
<!-- Workaround: forcing C# rebuild so that timestamp are up to date (ideally we should have separate input/output groups for C# and Native) -->
|
|
|
|
|
<Delete Files="@(IntermediateAssembly)"/>
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
<Target Name="CompileNativeClang_macOS" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="'$(StridePlatform)' == 'macOS' And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<Target Name="CompileNativeClang_macOS" Inputs="@(StrideNativeCFile);@(StrideNativeHFile)" Outputs="@(StrideNativeOutput)" Condition="('$(TargetFramework)' == '$(StrideFramework)') And $(DesignTimeBuild) != true And $(BuildingProject) != false" BeforeTargets="CoreCompile" DependsOnTargets="_StrideRegisterNativeOutputs">
|
|
|
|
|
<MakeDir Directories="$(OutputObjectPath)\osx-x64"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClang) -o "$(OutputObjectPath)\osx-x64\%(StrideNativeCFile.Filename)_x64.o" -c "%(StrideNativeCFile.FullPath)" -fPIC -target x86_64-apple-darwin" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClangCPP) $(StrideNativeClang) -o "$(OutputObjectPath)\osx-x64\%(StrideNativeCFile.Filename)_x64.o" -c "%(StrideNativeCFile.FullPath)" -fPIC -target x86_64-apple-darwin" />
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\darwin_ld.exe" -arch x86_64 -w -flat_namespace -undefined dynamic_lookup -sdk_version 10.11 -macosx_version_min 10.11 -dylib -o "$(StrideNativeOutputPath)\$(StrideNativeOutputName)$(StrideNativeLibraryTargetExt)" @(StrideNativeCFile->'"$(OutputObjectPath)\osx-x64\%(Filename)_x64.o"', ' ') @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\NativePath\dotnet\osx-x64\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\NativePath\dotnet\osx-x64\libNativePath.a"" />
|
|
|
|
|
<MakeDir Directories="$(StrideNativeOutputPath)\osx-x64"/>
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' != '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClang) -DPLATFORM_MACOS -o "$(OutputObjectPath)\osx-x64\%(StrideNativeCFile.Filename)_x64.o" -c "%(StrideNativeCFile.FullPath)" -fPIC -target x86_64-apple-darwin" />
|
|
|
|
|
<Exec Condition="'%(StrideNativeCFile.Extension)' == '.cpp'" Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\clang.exe" $(StrideNativeClangCPP) $(StrideNativeClang) -DPLATFORM_MACOS -o "$(OutputObjectPath)\osx-x64\%(StrideNativeCFile.Filename)_x64.o" -c "%(StrideNativeCFile.FullPath)" -fPIC -target x86_64-apple-darwin" />
|
|
|
|
|
<Exec Command=""$(MSBuildThisFileDirectory)..\..\deps\\LLVM\darwin_ld.exe" -arch x86_64 -w -flat_namespace -undefined dynamic_lookup -sdk_version 10.11 -macosx_version_min 10.11 -dylib -o "$(StrideNativeOutputPath)\osx-x64\$(StrideNativeOutputName).dylib" @(StrideNativeCFile->'"$(OutputObjectPath)\osx-x64\%(Filename)_x64.o"', ' ') @(StrideNativePathLibs2->'"$(MSBuildThisFileDirectory)..\..\deps\NativePath\dotnet\osx-x64\%(Filename).a"', ' ') "$(MSBuildThisFileDirectory)..\..\deps\NativePath\dotnet\osx-x64\libNativePath.a"" />
|
|
|
|
|
|
|
|
|
|
<!-- Workaround: forcing C# rebuild so that timestamp are up to date (ideally we should have separate input/output groups for C# and Native) -->
|
|
|
|
|
<Delete Files="@(IntermediateAssembly)"/>
|
|
|
|
|