mirror of
https://github.com/zeldaret/af.git
synced 2026-10-01 23:42:04 -04:00
380681908d
* Bring over MM's warnings_count system * Generate base warnings * Hook warnings to Jenkins * Fix setup warnings * splat flag * git subrepo pull --force tools/splat subrepo: subdir: "tools/splat" merged: "20922ca" upstream: origin: "git@github.com:ethteck/splat.git" branch: "master" commit: "20922ca" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * update fixed stuff * fix warnings * Fix "F3DEX_GBI_2 redefined" warning * git subrepo pull --force lib/ultralib subrepo: subdir: "lib/ultralib" merged: "d163fa4" upstream: origin: "git@github.com:decompals/ultralib.git" branch: "main" commit: "d163fa4" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * update warning count for lib * restore custom gbi.h
44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
from dataclasses import dataclass
|
|
from typing import Optional
|
|
|
|
|
|
@dataclass
|
|
class Compiler:
|
|
name: str
|
|
asm_function_macro: str = "glabel"
|
|
asm_jtbl_label_macro: str = "glabel"
|
|
asm_data_macro: str = "glabel"
|
|
asm_end_label: str = ""
|
|
c_newline: str = "\n"
|
|
asm_inc_header: str = ""
|
|
include_macro_inc: bool = True
|
|
asm_emit_size_directive: Optional[bool] = None
|
|
|
|
|
|
GCC = Compiler(
|
|
"GCC",
|
|
asm_inc_header=".set noat /* allow manual use of $at */\n.set noreorder /* don't insert nops after branches */\n\n",
|
|
)
|
|
|
|
SN64 = Compiler(
|
|
"SN64",
|
|
asm_function_macro=".globl",
|
|
asm_jtbl_label_macro=".globl",
|
|
asm_data_macro=".globl",
|
|
asm_end_label=".end",
|
|
c_newline="\r\n",
|
|
include_macro_inc=False,
|
|
asm_emit_size_directive=False,
|
|
)
|
|
|
|
IDO = Compiler("IDO", include_macro_inc=False, asm_emit_size_directive=False)
|
|
|
|
compiler_for_name = {"GCC": GCC, "SN64": SN64, "IDO": IDO}
|
|
|
|
|
|
def for_name(name: str) -> Compiler:
|
|
name = name.upper()
|
|
if name in compiler_for_name:
|
|
return compiler_for_name[name]
|
|
return Compiler(name)
|