Пример #1
0
        static bool IsLlvmRuntimeEnabled(Context ctx, string llvmAbi)
        {
            bool enabled = false;
            bool windows = ctx.IsLlvmWindowsAbi(llvmAbi);
            bool is64Bit = ctx.Is64BitLlvmAbi(llvmAbi);

            HashSet <string> targets;

            if (windows)
            {
                targets = is64Bit ? AbiNames.All64BitWindowsAotAbis : AbiNames.All32BitWindowsAotAbis;
            }
            else
            {
                targets = is64Bit ? AbiNames.All64BitHostAotAbis : AbiNames.All32BitHostAotAbis;
            }

            foreach (string target in targets)
            {
                if (Context.Instance.IsTargetAotAbiEnabled(target))
                {
                    enabled = true;
                    break;
                }
            }

            return(enabled && (!is64Bit || Context.Instance.OS.Is64Bit));
        }