diff options
author | Evan Lojewski <github@meklort.com> | 2020-11-08 09:12:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 09:12:44 -0700 |
commit | 3ae918c8115b0496b98a978ffe2a64bd2d078f64 (patch) | |
tree | b17cfc3c8f668a5a25d89175e678fd0853058887 /cmake/mips.cmake | |
parent | e86f52c7073e3ce983c5e7e93286eb9a73fd8ba8 (diff) | |
download | bcm5719-ortega-3ae918c8115b0496b98a978ffe2a64bd2d078f64.tar.gz bcm5719-ortega-3ae918c8115b0496b98a978ffe2a64bd2d078f64.zip |
build: Enable linting checkes (#165)
* build: Enable linting with wrapper.
* build: Disable lint errors on libs/Network and stage1 until fixed.
Diffstat (limited to 'cmake/mips.cmake')
-rw-r--r-- | cmake/mips.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmake/mips.cmake b/cmake/mips.cmake index 17c2f7b..014be4d 100644 --- a/cmake/mips.cmake +++ b/cmake/mips.cmake @@ -42,12 +42,10 @@ ### @endcond ################################################################################ -SET(MIPS_COMPILE_OPTIONS - -nostdlib -nodefaultlibs - $<$<NOT:$<COMPILE_LANGUAGE:ASM>>:-fomit-frame-pointer> # Don't include for ASM sources - -target mips -mcpu=mips2 - $<$<NOT:$<COMPILE_LANGUAGE:ASM>>:-include "${CMAKE_SOURCE_DIR}/include/banned.h"> -) +SET(MIPS_COMPILE_OPTIONS "-DLINT_FILE=clang-mips" -nostdlib -nodefaultlibs + -fomit-frame-pointer + -include "${CMAKE_SOURCE_DIR}/include/banned.h" + -target mips -mcpu=mips2) SET(MIPS_LINK_OPTIONS --gc-sections) # SET(CMAKE_EXE_LINKER_FLAGS -static) @@ -57,6 +55,8 @@ SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp <DEFINE SET(CMAKE_mips_LINK_EXECUTABLE "${COMPILER_BASE}/bin/ld.lld <OBJECTS> <LINK_LIBRARIES> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> -Bstatic -o <TARGET>") +generate_lint_config("${MIPS_COMPILE_OPTIONS}" ${CMAKE_BINARY_DIR}/.clang-mips.lnt ${CMAKE_BINARY_DIR}/.clang-mips.h) + # MIPS-specific executables function(mips_add_executable target) add_executable(${target} ${ARGN}) |