We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1480344 commit 46c533cCopy full SHA for 46c533c
mypyc/build.py
@@ -523,8 +523,17 @@ def mypycify(
523
# This flag is needed for gcc but does not exist on clang.
524
cflags += ['-Wno-unused-but-set-variable']
525
elif compiler.compiler_type == 'msvc':
526
- if opt_level == '3':
+ # msvc doesn't have levels, '/O2' is full and '/Od' is disable
527
+ if opt_level == '0':
528
+ opt_level = 'd'
529
+ elif opt_level in ('1', '2', '3'):
530
opt_level = '2'
531
+ if debug_level == '0':
532
+ cflags += ['/DEBUG:NONE']
533
+ elif debug_level == '1':
534
+ cflags += ['/DEBUG:FASTLINK']
535
+ elif debug_level in ('2', '3'):
536
+ cflags += ['/DEBUG:FULL']
537
cflags += [
538
'/O{}'.format(opt_level),
539
'/wd4102', # unreferenced label
0 commit comments