File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
branches/incoming/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 @@ -6,7 +6,7 @@ refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/incoming: d09835d2e3c0cb3227baec0ba6f1b23d7c95f474
9
+ refs/heads/incoming: 77eadc0653dac6314ee425ab2502433348c82418
10
10
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
11
11
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
12
12
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
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