diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt index d15671a23fbaf9..bbc0f7abafd550 100644 --- a/libc/include/CMakeLists.txt +++ b/libc/include/CMakeLists.txt @@ -25,6 +25,7 @@ macro(add_header_macro TARGET_NAME YAML_FILE DEF_FILE GEN_HDR DEPENDS) DEF_FILE ${DEF_FILE} GEN_HDR ${GEN_HDR} ${DEPENDS} + ${ARGN} ) else() add_gen_header( @@ -32,6 +33,7 @@ macro(add_header_macro TARGET_NAME YAML_FILE DEF_FILE GEN_HDR DEPENDS) DEF_FILE ${DEF_FILE} GEN_HDR ${GEN_HDR} ${DEPENDS} + ${ARGN} ) endif() endmacro() diff --git a/libc/newhdrgen/class_implementation/classes/function.py b/libc/newhdrgen/class_implementation/classes/function.py index ccfd93547c1d8a..ea5e8223a538ef 100644 --- a/libc/newhdrgen/class_implementation/classes/function.py +++ b/libc/newhdrgen/class_implementation/classes/function.py @@ -26,7 +26,7 @@ def __str__(self): attributes_str = " ".join(self.attributes) arguments_str = ", ".join(self.arguments) if attributes_str == "": - result = f"{self.return_type} {self.name}({arguments_str});" + result = f"{self.return_type} {self.name}({arguments_str}) __NOEXCEPT;" else: - result = f"{attributes_str} {self.return_type} {self.name}({arguments_str})" + result = f"{attributes_str} {self.return_type} {self.name}({arguments_str}) __NOEXCEPT;" return result diff --git a/libc/newhdrgen/header.py b/libc/newhdrgen/header.py index 141e3c9b2736b6..2671f00d7e47a4 100644 --- a/libc/newhdrgen/header.py +++ b/libc/newhdrgen/header.py @@ -60,16 +60,16 @@ def __str__(self): current_guard = None for function in self.functions: if function.guard == None: - content.append(str(function) + " __NOEXCEPT;") + content.append(str(function)) content.append("") else: if current_guard == None: current_guard = function.guard content.append(f"#ifdef {current_guard}") - content.append(str(function) + " __NOEXCEPT;") + content.append(str(function)) content.append("") elif current_guard == function.guard: - content.append(str(function) + " __NOEXCEPT;") + content.append(str(function)) content.append("") else: content.pop() @@ -77,7 +77,7 @@ def __str__(self): content.append("") current_guard = function.guard content.append(f"#ifdef {current_guard}") - content.append(str(function) + " __NOEXCEPT;") + content.append(str(function)) content.append("") if current_guard != None: content.pop()