Skip to content

Commit ac1237c

Browse files
lufinkeylufinkey
lufinkey
authored and
lufinkey
committed
small compiling fixes
1 parent 57fc198 commit ac1237c

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

Source/Compiler/CompilerThread.cpp

+22-1
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,14 @@ String CompilerThread_createAssembleString(ProjectData& projData, const String&
529529
}
530530
}
531531

532+
//user-specified compiler flags
533+
ArrayList<String>& flags = projData.getProjectSettings().getAssemblerFlags();
534+
for(int i=0; i<flags.size(); i++)
535+
{
536+
String& flag = flags.get(i);
537+
command += flag + " ";
538+
}
539+
532540
//source file
533541
command += (String)"\"" + file + "\" ";
534542

@@ -643,7 +651,20 @@ String CompilerThread_createCompileString(ProjectData& projData, const ArrayList
643651
for(int j=0; j<libFiles.size(); j++)
644652
{
645653
String& file = libFiles.get(j);
646-
command += (String)"\"" + file + "\" ";
654+
String extension = "";
655+
int dotIndex = file.lastIndexOf(".");
656+
if(dotIndex!=-1)
657+
{
658+
extension = file.substring(dotIndex+1, file.length());
659+
}
660+
if(extension=="dylib")
661+
{
662+
command += (String)"-l \""+file+"\" ";
663+
}
664+
else
665+
{
666+
command += (String)"\"" + file + "\" ";
667+
}
647668
}
648669
}
649670
}

miniCode.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@
10401040
GCC_WARN_UNUSED_VARIABLE = YES;
10411041
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
10421042
OTHER_CODE_SIGN_FLAGS = "";
1043-
SDKROOT = iphoneos6.1;
1043+
SDKROOT = iphoneos5.0;
10441044
TARGETED_DEVICE_FAMILY = "1,2";
10451045
VALID_ARCHS = "armv6 armv7";
10461046
};
@@ -1066,7 +1066,7 @@
10661066
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
10671067
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
10681068
OTHER_CODE_SIGN_FLAGS = "";
1069-
SDKROOT = iphoneos6.1;
1069+
SDKROOT = iphoneos5.0;
10701070
TARGETED_DEVICE_FAMILY = "1,2";
10711071
VALID_ARCHS = "armv6 armv7";
10721072
};

0 commit comments

Comments
 (0)