{"record":{"id":"d41ec2492b8484b6","repo":"dotnet/runtime","slug":"tiering-options-have-no-effect-for-nativeaot-colle","errorCode":null,"errorMessage":"Tiering options have no effect for nativeaot collections.","messagePattern":"Tiering options have no effect for nativeaot collections\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi.py","lineNumber":723,"sourceCode":"\n        if coreclr_args.pmi:\n            self.pmi_location = determine_pmi_location(coreclr_args)\n            self.corerun = os.path.join(self.core_root, self.corerun_tool_name)\n\n        if coreclr_args.crossgen2:\n            self.corerun = os.path.join(self.core_root, self.corerun_tool_name)\n\n        if coreclr_args.pmi or coreclr_args.crossgen2:\n            self.assemblies = coreclr_args.assemblies\n            self.exclude = coreclr_args.exclude\n            if coreclr_args.tiered_compilation or coreclr_args.tiered_pgo:\n               raise RuntimeError(\"Tiering options have no effect for pmi or crossgen2 collections.\")\n\n        if coreclr_args.nativeaot:\n            self.ilc_rsps = coreclr_args.ilc_rsps\n            self.exclude = coreclr_args.exclude\n            if coreclr_args.tiered_compilation or coreclr_args.tiered_pgo:\n                raise RuntimeError(\"Tiering options have no effect for nativeaot collections.\")\n\n        if coreclr_args.tiered_compilation and coreclr_args.tiered_pgo:\n            raise RuntimeError(\"Pass only one tiering option.\")\n\n        self.coreclr_args = coreclr_args\n\n        self.temp_location = None\n\n        # Pathname for a temporary .MCL file used for noticing SuperPMI replay failures against base MCH.\n        self.base_fail_mcl_file = None\n\n        # The base .MCH file path\n        self.base_mch_file = None\n\n        # Final .MCH file path\n        if self.coreclr_args.output_mch_path is not None:\n            self.final_mch_file = os.path.abspath(self.coreclr_args.output_mch_path)\n            final_mch_dir = os.path.dirname(self.final_mch_file)","sourceCodeStart":705,"sourceCodeEnd":741,"githubUrl":"https://github.com/dotnet/runtime/blob/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/scripts/superpmi.py#L705-L741","documentation":"Raised by SuperPMICollect.__init__ in superpmi.py when --nativeaot is combined with --tiered_compilation or --tiered_pgo. NativeAOT is full ahead-of-time compilation, so tiered compilation and tiered PGO do not apply; the combination is rejected.","triggerScenarios":"Invoking `superpmi.py collect --nativeaot -ilc_rsps <files> --tiered_compilation ...` (or --tiered_pgo).","commonSituations":"Reusing a tiered-collect command line with --nativeaot added; assuming tiering knobs apply to AOT.","solutions":["Remove --tiered_compilation / --tiered_pgo from the nativeaot collection invocation.","Pass nativeaot-specific codegen options via the rsp/--codegenopt mechanism instead of tiering flags."],"exampleFix":"// before\npython superpmi.py collect --nativeaot -ilc_rsps foo.ilc.rsp --tiered_pgo   # 'Tiering options have no effect for nativeaot collections.'\n// after\npython superpmi.py collect --nativeaot -ilc_rsps foo.ilc.rsp","handlingStrategy":"validation","validationCode":"if args.nativeaot and (args.tiered_compilation or args.tiered_pgo):\n    raise SystemExit(\"--nativeaot cannot be combined with --tiered_compilation/--tiered_pgo\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["NativeAOT is full AOT; tiering knobs never apply.","Drive nativeaot codegen choices through the rsp/--codegenopt instead."],"tags":["superpmi","collect","nativeaot","argument-validation","python"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}