def get_args_without_osxims():
    new_argv = []
    i = 1
    while i < len(sys.argv):
        arg = sys.argv[i]
        next_arg = sys.argv[i + 1] if (i + 1 < len(sys.argv)) else None

        if arg == '-isysroot' and 'SDKs/MacOSX' in next_arg:
            # skip, it's referencing the OSX SDK.
            i = i + 2
        elif ('-mmacosx-version-min' in arg):
            # clang won't be OK with '-mmacosx-version-min' and
            # '-miphoneos-version-min' being passed at the same time.
            i = i + 1
        elif (arg == '-F/Applications/Xcode.app/Contents/'
                     'Developer/Library/Frameworks'):
            # skip - for some reason Xcode5 always includes this framework path
            # and it's causing ld to select the wrong version of SenTestingKit:
            #
            # ld: building for iOS Simulator, but linking against dylib built for
            # MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/
            # Frameworks/SenTestingKit.framework/SenTestingKit' for
            # architecture i386
            #
            # It's also always using /Application/Xcode.app even when the active
            # Xcode is something else.
            i = i + 1
        else:
            i = i + 1
            new_argv.append(arg)
    return new_argv
dataset/ETHPy150Open facebook/clang-as-ios-dylib/clang-as-ios-dylib.py/get_args_without_osxims/original