Skip to content

Commit

Permalink
enable missing-prototypes in functorch (pytorch#103391)
Browse files Browse the repository at this point in the history
This PR enables  missing-prototypes in functorch target and turn some functions into static ones

Pull Request resolved: pytorch#103391
Approved by: https://github.com/malfet
  • Loading branch information
cyyever authored and pytorchmergebot committed Jun 12, 2023
1 parent de354bf commit 48e3ee2
Show file tree
Hide file tree
Showing 3 changed files with 204 additions and 186 deletions.
2 changes: 2 additions & 0 deletions functorch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE FUNCTORCH_BUILD_MAIN_LIB)
target_compile_definitions(${PROJECT_NAME} PRIVATE TORCH_EXTENSION_NAME=_C)
target_compile_definitions(${PROJECT_NAME} PRIVATE TORCH_API_INCLUDE_EXTENSION_H)
target_compile_options(${PROJECT_NAME} PRIVATE ${TORCH_PYTHON_COMPILE_OPTIONS})
target_compile_options_if_supported(${PROJECT_NAME} "-Wmissing-prototypes")
target_compile_options_if_supported(${PROJECT_NAME} "-Werror=missing-prototypes")
target_link_libraries(${PROJECT_NAME} PRIVATE torch torch_python)
target_link_libraries(${PROJECT_NAME} PRIVATE pybind::pybind11)

Expand Down
Loading

0 comments on commit 48e3ee2

Please sign in to comment.