mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
fuzzing: make fuzzing work with vcpkg and the new library layout (#18970)
We need to replace the vcpkg "target triplet" configs with ones that enable ASAN!
This commit is contained in:
parent
2d64a3a4ab
commit
c594fcc91b
@ -0,0 +1,6 @@
|
|||||||
|
set(VCPKG_TARGET_ARCHITECTURE arm64)
|
||||||
|
set(VCPKG_CRT_LINKAGE static)
|
||||||
|
set(VCPKG_LIBRARY_LINKAGE static)
|
||||||
|
|
||||||
|
set(VCPKG_CXX_FLAGS /fsanitize=address)
|
||||||
|
set(VCPKG_C_FLAGS /fsanitize=address)
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||||
|
set(VCPKG_CRT_LINKAGE static)
|
||||||
|
set(VCPKG_LIBRARY_LINKAGE static)
|
||||||
|
|
||||||
|
set(VCPKG_CXX_FLAGS /fsanitize=address)
|
||||||
|
set(VCPKG_C_FLAGS /fsanitize=address)
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
set(VCPKG_TARGET_ARCHITECTURE x86)
|
||||||
|
set(VCPKG_CRT_LINKAGE static)
|
||||||
|
set(VCPKG_LIBRARY_LINKAGE static)
|
||||||
|
|
||||||
|
set(VCPKG_CXX_FLAGS /fsanitize=address)
|
||||||
|
set(VCPKG_C_FLAGS /fsanitize=address)
|
||||||
@ -262,7 +262,7 @@
|
|||||||
<PreprocessorDefinitions>FUZZING_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>FUZZING_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>libsancov.lib;clang_rt.asan-$(OCClangArchitectureName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>libsancov.lib;clang_rt.asan_dynamic-$(OCClangArchitectureName).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
|
||||||
@ -279,12 +279,14 @@
|
|||||||
<VcpkgPlatformTarget Condition="'$(Platform)'=='ARM64'">arm64</VcpkgPlatformTarget>
|
<VcpkgPlatformTarget Condition="'$(Platform)'=='ARM64'">arm64</VcpkgPlatformTarget>
|
||||||
|
|
||||||
<VcpkgAdditionalInstallOptions>--x-feature=terminal</VcpkgAdditionalInstallOptions>
|
<VcpkgAdditionalInstallOptions>--x-feature=terminal</VcpkgAdditionalInstallOptions>
|
||||||
|
<VcpkgAdditionalInstallOptions Condition="'$(Configuration)'=='Fuzzing'">$(VcpkgAdditionalInstallOptions) --overlay-triplets=$(SolutionDir)\dep\vcpkg-overlay-triplets\fuzzing</VcpkgAdditionalInstallOptions>
|
||||||
<!--
|
<!--
|
||||||
Since we link everything statically, we don't need to copy anything.
|
Since we link everything statically, we don't need to copy anything.
|
||||||
This saves running a powershell script for every project.
|
This saves running a powershell script for every project.
|
||||||
-->
|
-->
|
||||||
<VcpkgApplocalDeps>false</VcpkgApplocalDeps>
|
<VcpkgApplocalDeps>false</VcpkgApplocalDeps>
|
||||||
<VcpkgInstalledDir>$(SolutionDir)\obj\$(Platform)\vcpkg</VcpkgInstalledDir>
|
<VcpkgInstalledDir>$(SolutionDir)\obj\$(Platform)\vcpkg</VcpkgInstalledDir>
|
||||||
|
<VcpkgInstalledDir Condition="'$(Configuration)'=='Fuzzing'">$(SolutionDir)\obj\$(Platform)\vcpkg-fuzzing</VcpkgInstalledDir>
|
||||||
<VcpkgRoot Condition="'$(VcpkgRoot)'==''">$(VCPKG_ROOT)</VcpkgRoot>
|
<VcpkgRoot Condition="'$(VcpkgRoot)'==''">$(VCPKG_ROOT)</VcpkgRoot>
|
||||||
<!-- VsInstallRoot is set by Visual Studio and MSBuild -->
|
<!-- VsInstallRoot is set by Visual Studio and MSBuild -->
|
||||||
<VcpkgRoot Condition="'$(VcpkgRoot)'==''">$(VsInstallRoot)\VC\vcpkg</VcpkgRoot>
|
<VcpkgRoot Condition="'$(VcpkgRoot)'==''">$(VsInstallRoot)\VC\vcpkg</VcpkgRoot>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user