File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
branches/auto/src/rustllvm Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: d09835d2e3c0cb3227baec0ba6f1b23d7c95f474
17
+ refs/heads/auto: 77eadc0653dac6314ee425ab2502433348c82418
18
18
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ using namespace llvm::sys;
62
62
63
63
static const char *LLVMRustError;
64
64
65
+ extern cl::opt<bool > EnableARMEHABI;
66
+
65
67
extern " C" LLVMMemoryBufferRef
66
68
LLVMRustCreateMemoryBufferWithContentsOfFile (const char *Path) {
67
69
LLVMMemoryBufferRef MemBuf = NULL ;
@@ -429,10 +431,16 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
429
431
430
432
LLVMRustInitializeTargets ();
431
433
432
- int argc = 3 ;
433
- const char * argv[] = {" rustc" , " -arm-enable-ehabi" ,
434
- " -arm-enable-ehabi-descriptors" };
435
- cl::ParseCommandLineOptions (argc, argv);
434
+ // Initializing the command-line options more than once is not
435
+ // allowed. So, check if they've already been initialized.
436
+ // (This could happen if we're being called from rustpkg, for
437
+ // example.)
438
+ if (!EnableARMEHABI) {
439
+ int argc = 3 ;
440
+ const char * argv[] = {" rustc" , " -arm-enable-ehabi" ,
441
+ " -arm-enable-ehabi-descriptors" };
442
+ cl::ParseCommandLineOptions (argc, argv);
443
+ }
436
444
437
445
TargetOptions Options;
438
446
Options.NoFramePointerElim = true ;
You can’t perform that action at this time.
0 commit comments