MCPcopy Create free account
hub / github.com/FastLED/FastLED / main

Function main

ci/wasm_build_library.py:848–911  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

846
847
848def main() -> int:
849 parser = argparse.ArgumentParser(
850 description="Build FastLED static library for WASM with incremental compilation"
851 )
852 parser.add_argument(
853 "--mode",
854 default="quick",
855 choices=["debug", "fast_debug", "quick", "release"],
856 help="Build mode (default: quick)",
857 )
858 parser.add_argument(
859 "--force",
860 action="store_true",
861 help="Force rebuild all objects",
862 )
863 parser.add_argument(
864 "--clean",
865 action="store_true",
866 help="Remove library artifacts and exit",
867 )
868 parser.add_argument(
869 "-v",
870 "--verbose",
871 action="store_true",
872 help="Verbose output",
873 )
874 parser.add_argument(
875 "--parallel",
876 type=int,
877 metavar="N",
878 help="Number of parallel jobs (default: CPU count)",
879 )
880 parser.add_argument(
881 "--unity-chunks",
882 type=int,
883 default=0,
884 metavar="N",
885 help="Enable unity builds with N chunks (default: 0 = disabled)",
886 )
887
888 args = parser.parse_args()
889
890 try:
891 # Handle clean command
892 if args.clean:
893 return clean_library()
894
895 # Build library
896 return build_library(
897 args.mode, args.force, args.verbose, args.parallel, args.unity_chunks
898 )
899
900 except KeyboardInterrupt as ki:
901 handle_keyboard_interrupt(ki)
902 raise
903 print("\n✗ Build interrupted by user")
904 raise
905 except Exception as e:

Callers 1

Calls 5

clean_libraryFunction · 0.85
parse_argsMethod · 0.80
build_libraryFunction · 0.70
printFunction · 0.50

Tested by

no test coverage detected