Skip to content

Commit

Permalink
c++17 also on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Nov 24, 2024
1 parent b360398 commit 6a2d162
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
From 3066945fb1737f8f0aa0285dd0857ebd7820858a Mon Sep 17 00:00:00 2001
From cc968a797278f4862db877a9449fadcc60f455b7 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Mon, 25 Nov 2024 08:07:00 +1100
Subject: [PATCH] use our own sentencepiece/abseil

---
curated_tokenizers/_spp.pxd | 2 +-
setup.py | 37 +++++++++++++++++++++++++------------
2 files changed, 26 insertions(+), 13 deletions(-)
setup.py | 38 +++++++++++++++++++++++++------------
2 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/curated_tokenizers/_spp.pxd b/curated_tokenizers/_spp.pxd
index 29f5ec2..4630b45 100644
Expand All @@ -22,7 +22,7 @@ index 29f5ec2..4630b45 100644
uint32_t id() const
const string & piece() const
diff --git a/setup.py b/setup.py
index d0aa11b..eaf40d0 100755
index d0aa11b..0306041 100755
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,6 @@
Expand All @@ -32,8 +32,11 @@ index d0aa11b..eaf40d0 100755
import sys
from setuptools.command.build_ext import build_ext
from setuptools import Extension, setup, find_packages
@@ -81,16 +83,14 @@ COMPILE_OPTIONS = {
@@ -79,18 +81,17 @@ MOD_NAMES = [
]
COMPILE_OPTIONS = {
"msvc": [
+ "/std:c++17",
"/Ox",
"/EHsc",
- "/D_USE_INTERNAL_STRING_VIEW",
Expand All @@ -50,7 +53,7 @@ index d0aa11b..eaf40d0 100755
"-pthread",
"-DHAVE_PTHREAD=1",
],
@@ -139,21 +139,34 @@ def setup_package():
@@ -139,21 +140,34 @@ def setup_package():
if len(sys.argv) > 1 and sys.argv[1] == "clean":
return clean(root / "curated_tokenizers")

Expand Down

0 comments on commit 6a2d162

Please sign in to comment.