File tree 1 file changed +12
-10
lines changed
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -5529,6 +5529,10 @@ static void init_julia_llvm_env(Module *m)
5529
5529
5530
5530
extern " C" void jl_init_codegen (void )
5531
5531
{
5532
+ #if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_)
5533
+ const char *const argv[] = {" " , " -disable-copyprop" }; // llvm bug 21743
5534
+ cl::ParseCommandLineOptions (sizeof (argv)/sizeof (argv[0 ]), argv, " disable-copyprop\n " );
5535
+ #endif
5532
5536
#ifdef JL_DEBUG_BUILD
5533
5537
cl::ParseEnvironmentOptions (" Julia" , " JULIA_LLVM_ARGS" );
5534
5538
#endif
@@ -5597,19 +5601,17 @@ extern "C" void jl_init_codegen(void)
5597
5601
#endif
5598
5602
#ifdef USE_MCJIT
5599
5603
jl_mcjmm = new SectionMemoryManager ();
5600
- SmallVector<std::string, 4 > MAttrs;
5601
- #else
5602
- // Temporarily disable Haswell BMI2 features due to LLVM bug.
5603
- const char *mattr[] = {" -bmi2" , " -avx2"
5604
- #ifdef V128_BUG
5605
- ," -avx"
5606
5604
#endif
5607
- #if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_)
5608
- ," -disable-copyprop" // llvm bug 21743
5605
+ const char *mattr[] = {
5606
+ #ifndef USE_MCJIT
5607
+ // Temporarily disable Haswell BMI2 features due to LLVM bug.
5608
+ " -bmi2" , " -avx2" ,
5609
5609
#endif
5610
- };
5611
- SmallVector<std::string, 4 > MAttrs (mattr, mattr+ 2 );
5610
+ # ifdef V128_BUG
5611
+ " -avx " ,
5612
5612
#endif
5613
+ };
5614
+ SmallVector<std::string, 4 > MAttrs (mattr, mattr+sizeof (mattr)/sizeof (mattr[0 ]));
5613
5615
#ifdef LLVM36
5614
5616
EngineBuilder eb (std::move (std::unique_ptr<Module>(engine_module)));
5615
5617
#else
You can’t perform that action at this time.
0 commit comments