Skip to content

Commit ef8b4b1

Browse files
committed
Revert "win7 compat"
This reverts commit 56f3512. Removing CreateFile2 calls was insufficient to enable win7 support. There are win8+ API calls which are not straightforward to replace: onnxruntime\core\platform\windows\env_time.cc(31): error C2065: 'GetSystemTimePreciseAsFileTime': undeclared identifier
1 parent 56f3512 commit ef8b4b1

File tree

10 files changed

+44
-96
lines changed

10 files changed

+44
-96
lines changed

.github/workflows/rebuildDependencies.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,18 @@ jobs:
4545
os: windows-latest
4646
conan_profiles: '["msvc-x64"]'
4747
conan_options: -o "&:target_pre_windows10=True"
48+
- platform: windows-x64-win7
49+
os: windows-latest
50+
conan_profiles: '["msvc-x64-win7"]'
51+
conan_options: -o "&:target_pre_windows10=True" -o "&:with_onnxruntime=False"
4852
- platform: windows-x86
4953
os: windows-latest
5054
conan_profiles: '["msvc-x86"]'
5155
conan_options: -o "&:target_pre_windows10=True"
56+
- platform: windows-x86-win7
57+
os: windows-latest
58+
conan_profiles: '["msvc-x86-win7"]'
59+
conan_options: -o "&:target_pre_windows10=True" -o "&:with_onnxruntime=False"
5260
- platform: windows-arm64
5361
os: windows-11-arm
5462
conan_profiles: '["msvc-arm64"]'

conan_patches/onnxruntime/conandata.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@ patches:
77
- patch_file: "patches/msvc-x86.diff"
88
patch_description: |
99
Fixes detection of x86 windows targets during cross-compilation.
10-
- patch_file: "patches/win7.diff"
11-
patch_description: |
12-
Fixes compile errors on for windows 7 targets:
13-
error C3861: 'CreateFile2': identifier not found

conan_patches/onnxruntime/patches/win7.diff

Lines changed: 0 additions & 80 deletions
This file was deleted.

conan_profiles/base/msvc-intel

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,3 @@ compiler.update=4
1111
[conf]
1212
# VS 2022
1313
tools.microsoft.msbuild:vs_version=17
14-
15-
# https://walbourn.github.io/a-brief-history-of-windows-sdks/
16-
# https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
17-
# https://learn.microsoft.com/en-us/windows/win32/WinProg/using-the-windows-headers
18-
{% set _WIN32_WINNT_WIN7 = '0x0601' %}
19-
{% set NTDDI_WIN7 = '0x06010000' %}
20-
{% set win7_defines = [
21-
'_WIN32_WINNT={}'.format(_WIN32_WINNT_WIN7),
22-
'WINVER={}'.format(_WIN32_WINNT_WIN7),
23-
'NTDDI_VERSION={}'.format(NTDDI_WIN7),
24-
] %}
25-
tools.build:defines={{ win7_defines }}

conan_profiles/base/msvc-win7

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[conf]
2+
# https://walbourn.github.io/a-brief-history-of-windows-sdks/
3+
# https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
4+
# https://learn.microsoft.com/en-us/windows/win32/WinProg/using-the-windows-headers
5+
{% set _WIN32_WINNT_WIN7 = '0x0601' %}
6+
{% set NTDDI_WIN7 = '0x06010000' %}
7+
{% set win7_defines = [
8+
'_WIN32_WINNT={}'.format(_WIN32_WINNT_WIN7),
9+
'WINVER={}'.format(_WIN32_WINNT_WIN7),
10+
'NTDDI_VERSION={}'.format(NTDDI_WIN7),
11+
] %}
12+
tools.build:defines={{ win7_defines }}

conan_profiles/base/msvc-win8

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[conf]
2+
# https://walbourn.github.io/a-brief-history-of-windows-sdks/
3+
# https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
4+
# https://learn.microsoft.com/en-us/windows/win32/WinProg/using-the-windows-headers
5+
{% set _WIN32_WINNT_WIN8 = '0x0602' %}
6+
{% set NTDDI_WIN8 = '0x06020000' %}
7+
{% set win8_defines = [
8+
'_WIN32_WINNT={}'.format(_WIN32_WINNT_WIN8),
9+
'WINVER={}'.format(_WIN32_WINNT_WIN8),
10+
'NTDDI_VERSION={}'.format(NTDDI_WIN8),
11+
] %}
12+
tools.build:defines={{ win8_defines }}

conan_profiles/msvc-x64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include(base/msvc-intel)
2+
include(base/msvc-win8)
23

34
[settings]
45
arch=x86_64

conan_profiles/msvc-x64-win7

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include(base/msvc-intel)
2+
include(base/msvc-win7)
3+
4+
[settings]
5+
arch=x86_64

conan_profiles/msvc-x86

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include(base/msvc-intel)
2+
include(base/msvc-win8)
23

34
[settings]
45
arch=x86

conan_profiles/msvc-x86-win7

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include(base/msvc-intel)
2+
include(base/msvc-win7)
3+
4+
[settings]
5+
arch=x86

0 commit comments

Comments
 (0)