1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00

fix m2ctx incompatibility on MacOS (#354)

This commit is contained in:
notyouraveragehooman 2020-09-02 04:13:21 -07:00 committed by GitHub
parent c033b4b28e
commit 48f2e10bef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
# Cache files # Cache files
__pycache__/ __pycache__/
.pyc .pyc
.DS_Store
# Text editor remnants # Text editor remnants
.vscode/ .vscode/

View File

@ -25,7 +25,7 @@ def get_c_file(directory):
def import_c_file(in_file): def import_c_file(in_file):
in_file = os.path.relpath(in_file, root_dir) in_file = os.path.relpath(in_file, root_dir)
cpp_command = ["cpp", "-P", "-Iinclude", "-Isrc", "-undef", "-D__sgi", "-D_LANGUAGE_C", cpp_command = ["gcc", "-E", "-P", "-Iinclude", "-Isrc", "-undef", "-D__sgi", "-D_LANGUAGE_C",
"-DNON_MATCHING", "-D_Static_assert(x, y)=", "-D__attribute__(x)=", in_file] "-DNON_MATCHING", "-D_Static_assert(x, y)=", "-D__attribute__(x)=", in_file]
try: try:
return subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8") return subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8")