mirror of
https://github.com/capstone-engine/capstone
synced 2026-08-11 16:26:07 -04:00
DIET MSVC C1001 Fix (#2782)
* DIET MSVC C1001 Fix
* added workflow for testing MSVC C1001 fix
* dispating workflow
* added cmake preset for diet build
* Fixed variable in CITest
* Added more cmake presers for CITest
* fixed compilation on AArch64 with DIET
* Revert "dispating workflow"
This reverts commit fd12444c5a.
This commit is contained in:
parent
ff04ff1aa0
commit
6bffa38b8c
4 changed files with 61 additions and 3 deletions
14
.github/workflows/CITest.yml
vendored
14
.github/workflows/CITest.yml
vendored
|
|
@ -197,6 +197,14 @@ jobs:
|
|||
platform: windows
|
||||
python-arch: x64
|
||||
python-version: '3.9'
|
||||
diet_build: false
|
||||
- name: 'windows x64 MSVC 64bit DIET'
|
||||
os: windows-latest
|
||||
arch: x64
|
||||
platform: windows
|
||||
python-arch: x64
|
||||
python-version: '3.9'
|
||||
diet_build: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -215,6 +223,6 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
cmake --version
|
||||
cmake --preset=${{ matrix.config.platform }}-x64
|
||||
cmake --build --preset build-${{ matrix.config.platform }}-release
|
||||
cmake --build --preset install-${{ matrix.config.platform }}-release
|
||||
cmake --preset=${{ matrix.config.platform }}-x64${{ matrix.config.diet_build == true && '-diet' || '' }}
|
||||
cmake --build --preset build-${{ matrix.config.platform }}${{ matrix.config.diet_build == true && '-diet' || '' }}-release
|
||||
cmake --build --preset install-${{ matrix.config.platform }}${{ matrix.config.diet_build == true && '-diet' || '' }}-release
|
||||
|
|
|
|||
|
|
@ -37,6 +37,18 @@
|
|||
"strategy": "external"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "diet",
|
||||
"hidden": true,
|
||||
"displayName": "DIET",
|
||||
"generator": "DIET build",
|
||||
"cacheVariables": {
|
||||
"CAPSTONE_BUILD_DIET": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-x64",
|
||||
"inherits": [ "ninja", "x64", "locations-base", "warnings-base" ],
|
||||
|
|
@ -51,6 +63,11 @@
|
|||
"name": "windows-x64",
|
||||
"inherits": [ "ninja", "x64", "locations-base", "warnings-base" ],
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
},
|
||||
{
|
||||
"name": "windows-x64-diet",
|
||||
"inherits": [ "ninja", "x64", "locations-base", "warnings-base", "diet" ],
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
|
|
@ -72,6 +89,12 @@
|
|||
"nativeToolOptions": [ "-v" ],
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
},
|
||||
{
|
||||
"name": "build-windows-diet",
|
||||
"configurePreset": "windows-x64-diet",
|
||||
"nativeToolOptions": [ "-v" ],
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
},
|
||||
{
|
||||
"name": "build-linux-release",
|
||||
"inherits": "build-linux",
|
||||
|
|
@ -90,6 +113,12 @@
|
|||
"configuration": "Release",
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
},
|
||||
{
|
||||
"name": "build-windows-diet-release",
|
||||
"inherits": "build-windows-diet",
|
||||
"configuration": "Release",
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
},
|
||||
{
|
||||
"name": "install-linux",
|
||||
"configurePreset": "linux-x64",
|
||||
|
|
@ -111,6 +140,13 @@
|
|||
"targets": [ "install" ],
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
},
|
||||
{
|
||||
"name": "install-windows-diet",
|
||||
"configurePreset": "windows-x64-diet",
|
||||
"inherits": "build-windows-diet",
|
||||
"targets": [ "install" ],
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
},
|
||||
{
|
||||
"name": "install-linux-release",
|
||||
"inherits": "install-linux",
|
||||
|
|
@ -128,6 +164,12 @@
|
|||
"inherits": "install-windows",
|
||||
"configuration": "Release",
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
},
|
||||
{
|
||||
"name": "install-windows-diet-release",
|
||||
"inherits": "install-windows-diet",
|
||||
"configuration": "Release",
|
||||
"condition": {"type": "equals", "lhs": "${hostSystemName}", "rhs": "Windows"}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,6 +190,8 @@ void SStream_concat0(SStream *ss, const char *s)
|
|||
ss->index += 1;
|
||||
ss->buffer[ss->index] = '\0';
|
||||
}
|
||||
#else
|
||||
ss->buffer[ss->index] = '\0';
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -214,6 +216,8 @@ void SStream_concat1(SStream *ss, const char c)
|
|||
ss->buffer[ss->index] = '>';
|
||||
ss->index++;
|
||||
}
|
||||
#else
|
||||
ss->buffer[ss->index] = '\0';
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -238,6 +242,8 @@ void SStream_concat(SStream *ss, const char *fmt, ...)
|
|||
ss->buffer[ss->index] = '>';
|
||||
ss->index += 1;
|
||||
}
|
||||
#else
|
||||
ss->buffer[ss->index] = '\0';
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -900,6 +900,7 @@ static void AArch64_add_cs_groups(MCInst *MI)
|
|||
|
||||
static void AArch64_correct_mem_access(MCInst *MI)
|
||||
{
|
||||
#ifndef CAPSTONE_DIET
|
||||
if (!detail_is_set(MI))
|
||||
return;
|
||||
cs_ac_type access =
|
||||
|
|
@ -913,6 +914,7 @@ static void AArch64_correct_mem_access(MCInst *MI)
|
|||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void AArch64_printer(MCInst *MI, SStream *O, void * /* MCRegisterInfo* */ info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue