File tree Expand file tree Collapse file tree 3 files changed +20
-21
lines changed
nautilus_trader/core/includes Expand file tree Collapse file tree 3 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -308,11 +308,25 @@ jobs:
308
308
python-version : ${{ matrix.python-version }}
309
309
free-disk-space : " false"
310
310
311
+ - name : Make clang-cl the default “cl”
312
+ shell : bash
313
+ run : |
314
+ mkdir -p "$GITHUB_WORKSPACE/bin"
315
+ cat >"$GITHUB_WORKSPACE/bin/cl.cmd" <<'EOF'
316
+ @echo off
317
+ "C:\Program Files\LLVM\bin\clang-cl.exe" %*
318
+ EOF
319
+
320
+ echo "$GITHUB_WORKSPACE/bin" > "$GITHUB_PATH"
321
+ chmod +x "$GITHUB_WORKSPACE/bin/cl.cmd"
322
+
311
323
- name : Use clang-cl
312
324
run : |
313
- echo 'C:\Program Files\LLVM\bin' > "$GITHUB_PATH"
314
- echo 'CC=clang-cl' >> "$GITHUB_ENV"
315
- echo 'CXX=clang-cl' >> "$GITHUB_ENV"
325
+ echo "C:\Program Files\LLVM\bin" >> "$GITHUB_PATH"
326
+ echo "CC=clang-cl" >> "$GITHUB_ENV"
327
+ echo "CXX=clang-cl" >> "$GITHUB_ENV"
328
+ echo "DISTUTILS_USE_SDK=1" >> "$GITHUB_ENV"
329
+ echo "CFLAGS=/D__SIZEOF_INT128__=0" >> "$GITHUB_ENV"
316
330
317
331
- name : Show compiler
318
332
run : ' "C:\Program Files\LLVM\bin\clang-cl" --version | head -n 1'
Original file line number Diff line number Diff line change @@ -5,16 +5,7 @@ includes = []
5
5
sys_includes = [" stdint.h" , " Python.h" ]
6
6
no_includes = true
7
7
tab_width = 4
8
- after_includes = """ \n
9
- #ifdef HIGH_PRECISION /* only when the Rust feature is enabled */
10
- /* Clang & GCC both understand __int128. CL on Windows (MSVC) does not,
11
- but when we compile with clang-cl (or on *nix) it works fine. */
12
- #ifdef __SIZEOF_INT128__ /* defined by all targets that actually support it */
13
- typedef __uint128_t uint128_t;
14
- typedef __int128_t int128_t;
15
- #endif
16
- #endif
17
- """
8
+ after_includes = " \n #ifdef __SIZEOF_INT128__\n typedef __uint128_t uint128_t;\n typedef __int128_t int128_t;\n #endif"
18
9
19
10
[defines ]
20
11
"feature = high-precision" = " HIGH_PRECISION"
Original file line number Diff line number Diff line change 5
5
#include <stdint.h>
6
6
#include <Python.h>
7
7
8
-
9
- #ifdef HIGH_PRECISION /* only when the Rust feature is enabled */
10
- /* Clang & GCC both understand __int128. CL on Windows (MSVC) does not,
11
- but when we compile with clang-cl (or on *nix) it works fine. */
12
- #ifdef __SIZEOF_INT128__ /* defined by all targets that actually support it */
8
+ #ifdef __SIZEOF_INT128__
13
9
typedef __uint128_t uint128_t ;
14
- typedef __int128_t int128_t ;
15
- #endif
10
+ typedef __int128_t int128_t ;
16
11
#endif
17
12
18
-
19
13
#define DEPTH10_LEN 10
20
14
21
15
/**
You can’t perform that action at this time.
0 commit comments