Skip to content

Commit

Permalink
enable LTO on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes committed Mar 19, 2023
1 parent 70552b4 commit 11e1573
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def build_extensions(self):

if self.compiler.compiler_type == 'msvc':
for e in self.extensions:
e.extra_compile_args += ['/O2', '/openmp', '/fp:contract', '/fp:except-']
e.extra_compile_args += ['/O2', '/openmp', '/GL', '/fp:contract', '/fp:except-']
else:
if not self.check_for_variable_dont_set_march() and not self.check_cflags_contain_arch():
self.add_march_native()
Expand All @@ -62,8 +62,7 @@ def build_extensions(self):
self.add_clang_fp_reassociate()
self.add_O3()
self.add_std_c99()
if not is_windows:
self.add_link_time_optimization()
self.add_link_time_optimization()

### Now add arguments as appropriate for good performance
for e in self.extensions:
Expand Down

0 comments on commit 11e1573

Please sign in to comment.