Skip to content

Commit

Permalink
trivial: run style formatter
Browse files Browse the repository at this point in the history
Signed-off-by: Gerwin Klein <[email protected]>
  • Loading branch information
lsf37 committed Feb 7, 2021
1 parent dcdd565 commit 2a6e245
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 1 addition & 2 deletions cmake-tool/helpers/cakeml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ function(DeclareCakeMLLib library_name)
"${HOLMAKEFILE}"
${PARSE_CML_LIB_DEPENDS}
WORKING_DIRECTORY "${CML_DIR}"
VERBATIM
${USES_TERMINAL_DEBUG}
VERBATIM ${USES_TERMINAL_DEBUG}
)
add_custom_target(${library_name}cakeml_asm_theory_target DEPENDS "${ASM_FILE}")
add_library(${library_name} STATIC EXCLUDE_FROM_ALL "${ASM_FILE}")
Expand Down
7 changes: 5 additions & 2 deletions cmake-tool/helpers/cpio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ function(MakeCPIO output_name input_files)
# Check that the reproducible flag is available. Don't use it if it isn't.
CheckCPIOArgument(cpio_reproducible_flag "--reproducible")
set(append "")
set(commands "bash;-c;cpio ${cpio_reproducible_flag} --quiet --create -H newc --file=${CMAKE_CURRENT_BINARY_DIR}/archive.${output_name}.cpio;&&")
set(
commands
"bash;-c;cpio ${cpio_reproducible_flag} --quiet --create -H newc --file=${CMAKE_CURRENT_BINARY_DIR}/archive.${output_name}.cpio;&&"
)
foreach(file IN LISTS input_files)
# Try and generate reproducible cpio meta-data as we do this:
# - touch -d @0 file sets the modified time to 0
Expand All @@ -60,7 +63,7 @@ function(MakeCPIO output_name input_files)
endforeach()
list(APPEND commands "true")
separate_arguments(cmake_c_flags_sep NATIVE_COMMAND "${CMAKE_C_FLAGS}")
if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
list(APPEND cmake_c_flags_sep "${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}")
endif()

Expand Down
5 changes: 4 additions & 1 deletion cmake-tool/simulate_scripts/launch_gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import argparse
import signal


def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('-b', '--binary', dest='gdb_binary', type=str,
Expand All @@ -21,10 +22,12 @@ def parse_args():
args = parser.parse_args()
return args


if __name__ == "__main__":
args = parse_args()

gdb_command_opts = [args.gdb_binary, args.extra_gdb_args, '-ex "target remote :1234"', args.target_executable]
gdb_command_opts = [args.gdb_binary, args.extra_gdb_args,
'-ex "target remote :1234"', args.target_executable]
gdb_command = " ".join(gdb_command_opts)

print(gdb_command)
Expand Down
6 changes: 4 additions & 2 deletions misc/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ def parse_filters(filters_file: str):
logging.warning("Failed to open filter file %s: %s", filters_file, exception)
return filters


def main():
parser = argparse.ArgumentParser("Filter files.")
parser.add_argument('-f', '--filters', type=str,
help='File with glob filters of files')
help='File with glob filters of files')
parser.add_argument('files', nargs='*', type=str,
help='List of files to be filtered')
help='List of files to be filtered')
args = parser.parse_args()

filters = parse_filters(args.filters)
Expand All @@ -52,5 +53,6 @@ def matches(pattern, fname=fname):
if not any(map(matches, filters)):
print(fname)


if __name__ == '__main__':
sys.exit(main())

0 comments on commit 2a6e245

Please sign in to comment.