From 11e15737f7ebe1351d535e695aea0e976356d12e Mon Sep 17 00:00:00 2001 From: david-cortes Date: Sun, 19 Mar 2023 16:52:37 +0100 Subject: [PATCH] enable LTO on windows --- setup.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 4f93aab..4d89641 100644 --- a/setup.py +++ b/setup.py @@ -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() @@ -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: