compiletools 5.3.0__tar.gz → 5.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {compiletools-5.3.0 → compiletools-5.3.3}/PKG-INFO +3 -3
- {compiletools-5.3.0 → compiletools-5.3.3}/pyproject.toml +3 -3
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-cache-clean.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-cache.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-cake.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-commandline.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-config.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-doc.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-filelist.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-findtargets.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-gitroot.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-headertree.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-jobs.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-list-variants.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-magicflags.rst +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/apptools.py +22 -6
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/cake.py +3 -3
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/compilation_database.py +76 -57
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/filelist.py +2 -2
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/findtargets.py +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/git_utils.py +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/headerdeps.py +3 -3
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/hunter.py +4 -4
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/magicflags.py +11 -4
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/makefile.py +3 -4
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/namer.py +14 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/preprocessor.py +1 -1
- compiletools-5.3.3/src/compiletools/samples/duplicate_flags/main.cpp +37 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_base.py +2 -2
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cake.py +3 -3
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_compilation_database.py +112 -16
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_findtargets.py +1 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_library.py +1 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_magicflags.py +131 -1
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_magicpkgconfig.py +6 -4
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_makefile.py +1 -1
- compiletools-5.3.3/src/compiletools/test_utils.py +166 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/testhelper.py +3 -0
- compiletools-5.3.3/src/compiletools/utils.py +426 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/version.py +1 -1
- compiletools-5.3.3/src/compiletools/wrappedos.py +117 -0
- compiletools-5.3.0/src/compiletools/test_utils.py +0 -93
- compiletools-5.3.0/src/compiletools/utils.py +0 -176
- compiletools-5.3.0/src/compiletools/wrappedos.py +0 -108
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-cppdeps.rst +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/__init__.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/benchmark_file_analyzer_cache.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/compiler_macros.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/config.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/configutils.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/cppdeps.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/create_cmakelists.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/blank.conf +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/blank.release.conf +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/clang.debug.conf +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/clang.release.conf +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/ct.conf +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/gcc.debug.conf +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/gcc.release.conf +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/dirnamer.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/diskcache.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/doc.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/file_analyzer.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/file_analyzer_cache.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/git_sha_report.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/global_hash_registry.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/headertree.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/jobs.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/listvariants.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/memoize.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/mmap_oracle_cache.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/add.C +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/add.H +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/calculator.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/calculator.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/conditional_includes/linux_header.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/conditional_includes/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/conditional_includes/windows_header.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/aarch64_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/advanced_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/advanced_preprocessor_header.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/advanced_preprocessor_test.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/alt_form_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/arm_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/armcc_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/avx2_optimization.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/basic_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cache_profiler.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/certificate_validation.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cflags_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/clang_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/combined_features.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/compiler_builtin_header.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/compiler_builtin_test.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/conditional_header.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cppflags_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cpu_profiler.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/custom_allocator.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cxxflags_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/default_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/detailed_profiler.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/elif_header.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/elif_test.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/emscripten_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/expert_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/expert_mode_base.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/fma_optimization.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/gcc_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/high_optimization.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/intel_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/leak_detector.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/linux_advanced.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/linux_epoll_threading.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/linux_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/memory_profiler.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/memory_tracker.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/msvc_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/multi_flag_header.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/multi_flag_test.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/nested_macros_header.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/nested_macros_test.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/networking_base.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/numa_threading.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/partial_features.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/profiling_base.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/riscv_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/simd_optimization.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/ssl_networking.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/stack_tracer.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/strict_cert_validation.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/tcc_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/temp_defined.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/temp_still_defined.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version1_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version2_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version3_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version_205_plus.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version_ge_2_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/windows_advanced.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/windows_iocp.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/windows_iocp_threading.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/x86_64_feature.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/cross_platform.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/cross_platform.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/cross_platform_lin.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/cross_platform_win.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/test_source.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cycle/cycle_a.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cycle/cycle_b.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cycle/cycle_c.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/d1/d1.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/d1/d1.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/d2/d2.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/d2/d2.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/dottypaths.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/a_widget.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/a_widget.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/red_herring_c_style_2.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/test_factory.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/widget.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/widget_factory.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/widget_factory.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/z_widget.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/z_widget.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/database.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/feature_config.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/graphics.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/logging.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/networking.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/isystem_include_bug/fake_system_include/system/version.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/isystem_include_bug/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/ldflags/conditional_ldflags_test.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/ldflags/version_dependent_ldflags.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/ldflags/version_macro.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/build.sh +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_double.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_double.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_int.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_int.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_numbers.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_numbers.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/lotsofmagic/lotsofmagic.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_deps/feature_header.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_deps/feature_x_impl.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_deps/feature_y_impl.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_deps/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/README.md +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/clean_main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/config.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/core.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/debug.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/feature.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/module_b.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/pytest_test.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/release.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/sample.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/test_exposes_bug.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/test_macro_state_bug.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/test_macro_state_dependency.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/complex_header.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/complex_test.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/macro_header.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/test_macro_transform.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/traits_header.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicinclude/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicinclude/subdir/important.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicinclude/subdir2/important2.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicinclude/subdir3/important3.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicpkgconfig/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/include_dir/some_header.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/include_dir/sub_dir/another_header.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/include_dir/sub_dir/the_code_lin.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/include_dir/sub_dir/the_code_win.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/movingheaders/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/movingheaders/someheader.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/nestedconfig/gcc.debug.conf +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/nestedconfig/nc.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/nestedconfig/subdir/gcc.debug.conf +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/nestedconfig/subdir/nc.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_double.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_double.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_int.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_int.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_numbers.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_numbers.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/test_direct_include.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/test_library.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/pkgconfig/main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/README.txt +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/createfile.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/createfile.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/filename.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/obtainlock.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/obtainlock.hpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/test_flock_1.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/test_flock_2.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/simple/helloworld_c.c +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/simple/helloworld_cpp.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/simple/test_cflags.c +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/api_config.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/api_config_new.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/test_main.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/test_main_new.cpp +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/version.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/version_new.h +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/simple_preprocessor.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_apptools.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cache_performance.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cache_versioning.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cap.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_compiler_macros.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_configutils.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cppdeps.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_ctcache_conflicts.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_ctcache_type_config.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_environment_assumptions.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_file_analyzer.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_file_analyzer_integration.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_headerdeps.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_hunter.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_listvariants.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_macro_state_dependency.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_magicinclude.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_mmap_oracle_cache.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_movingheaders.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_namer.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_serialisetests.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_simple_preprocessor.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/tree.py +0 -0
- {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/uth_reload.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: compiletools
|
|
3
|
-
Version: 5.3.
|
|
3
|
+
Version: 5.3.3
|
|
4
4
|
Summary: Tools to make compiling C/C++ projects easy
|
|
5
5
|
Keywords: c++,make,development
|
|
6
6
|
Author: DrGeoff
|
|
@@ -23,7 +23,7 @@ Requires-Dist: rich>=12.0.0
|
|
|
23
23
|
Requires-Dist: rich-rst>=1.1.7
|
|
24
24
|
Requires-Dist: stringzilla>=3.0.0
|
|
25
25
|
Requires-Dist: bump-my-version>=0.26.0 ; extra == 'dev'
|
|
26
|
-
Requires-Dist: twine>=5.
|
|
26
|
+
Requires-Dist: twine>=5.0.0 ; extra == 'dev'
|
|
27
27
|
Requires-Dist: pytest>=7.0.0 ; extra == 'dev'
|
|
28
28
|
Requires-Dist: pytest-xdist>=3.0.0 ; extra == 'dev'
|
|
29
29
|
Requires-Dist: ruff>=0.12.9 ; extra == 'dev'
|
|
@@ -47,7 +47,7 @@ C/C++ build tools that requires almost no configuration.
|
|
|
47
47
|
:Author: drgeoffathome@gmail.com
|
|
48
48
|
:Date: 2016-08-09
|
|
49
49
|
:Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
|
|
50
|
-
:Version: 5.3.
|
|
50
|
+
:Version: 5.3.3
|
|
51
51
|
:Manual section: 1
|
|
52
52
|
:Manual group: developers
|
|
53
53
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "compiletools"
|
|
3
|
-
version = "5.3.
|
|
3
|
+
version = "5.3.3"
|
|
4
4
|
description = "Tools to make compiling C/C++ projects easy"
|
|
5
5
|
readme = "src/compiletools/README.ct-doc.rst"
|
|
6
6
|
requires-python = ">=3.9"
|
|
@@ -33,7 +33,7 @@ dependencies = [
|
|
|
33
33
|
[project.optional-dependencies]
|
|
34
34
|
dev = [
|
|
35
35
|
"bump-my-version>=0.26.0",
|
|
36
|
-
"twine>=5.
|
|
36
|
+
"twine>=5.0.0",
|
|
37
37
|
"pytest>=7.0.0",
|
|
38
38
|
"pytest-xdist>=3.0.0",
|
|
39
39
|
"ruff>=0.12.9",
|
|
@@ -83,7 +83,7 @@ include = [
|
|
|
83
83
|
]
|
|
84
84
|
|
|
85
85
|
[tool.bumpversion]
|
|
86
|
-
current_version = "5.3.
|
|
86
|
+
current_version = "5.3.3"
|
|
87
87
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
88
88
|
serialize = ["{major}.{minor}.{patch}"]
|
|
89
89
|
search = "{current_version}"
|
|
@@ -9,7 +9,7 @@ Where is the dependency information used by the ct-* applications stored
|
|
|
9
9
|
:Author: drgeoffathome@gmail.com
|
|
10
10
|
:Date: 2018-02-21
|
|
11
11
|
:Copyright: Copyright (C) 2011-2018 Zomojo Pty Ltd
|
|
12
|
-
:Version: 5.3.
|
|
12
|
+
:Version: 5.3.3
|
|
13
13
|
:Manual section: 1
|
|
14
14
|
:Manual group: developers
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ This document describes the command line arguments that are common across ct-* p
|
|
|
9
9
|
:Author: drgeoffathome@gmail.com
|
|
10
10
|
:Date: 2017-07-06
|
|
11
11
|
:Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
|
|
12
|
-
:Version: 5.3.
|
|
12
|
+
:Version: 5.3.3
|
|
13
13
|
:Manual section: 1
|
|
14
14
|
:Manual group: developers
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ Determine header and source dependencies of a C/C++ file by following headers an
|
|
|
9
9
|
:Author: drgeoffathome@gmail.com
|
|
10
10
|
:Date: 2017-07-06
|
|
11
11
|
:Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
|
|
12
|
-
:Version: 5.3.
|
|
12
|
+
:Version: 5.3.3
|
|
13
13
|
:Manual section: 1
|
|
14
14
|
:Manual group: developers
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ Create a tree of header dependencies starting at the given C/C++ file
|
|
|
9
9
|
:Author: drgeoffathome@gmail.com
|
|
10
10
|
:Date: 2018-07-26
|
|
11
11
|
:Copyright: Copyright (C) 2011-2018 Zomojo Pty Ltd
|
|
12
|
-
:Version: 5.3.
|
|
12
|
+
:Version: 5.3.3
|
|
13
13
|
:Manual section: 1
|
|
14
14
|
:Manual group: developers
|
|
15
15
|
|
|
@@ -15,7 +15,7 @@ from compiletools.version import __version__
|
|
|
15
15
|
import compiletools.git_utils
|
|
16
16
|
import compiletools.configutils
|
|
17
17
|
import compiletools.utils
|
|
18
|
-
from compiletools.utils import
|
|
18
|
+
from compiletools.utils import split_command_cached
|
|
19
19
|
import compiletools.dirnamer
|
|
20
20
|
|
|
21
21
|
try:
|
|
@@ -362,9 +362,9 @@ def extract_system_include_paths(args, flag_sources=None, verbose=0):
|
|
|
362
362
|
if not flag_value:
|
|
363
363
|
continue
|
|
364
364
|
|
|
365
|
-
# Use existing shlex functionality from
|
|
365
|
+
# Use existing shlex functionality from split_command_cached
|
|
366
366
|
try:
|
|
367
|
-
tokens =
|
|
367
|
+
tokens = split_command_cached(flag_value)
|
|
368
368
|
except ValueError:
|
|
369
369
|
# Fall back to simple split if shlex fails
|
|
370
370
|
tokens = flag_value.split()
|
|
@@ -463,7 +463,7 @@ def extract_command_line_macros(args, flag_sources=None, include_compiler_macros
|
|
|
463
463
|
|
|
464
464
|
# Use shlex.split for robust parsing
|
|
465
465
|
try:
|
|
466
|
-
flags =
|
|
466
|
+
flags = split_command_cached(flag_string)
|
|
467
467
|
except ValueError:
|
|
468
468
|
# Fallback to simple split if shlex fails on malformed input
|
|
469
469
|
flags = flag_string.split()
|
|
@@ -805,6 +805,19 @@ def _do_xxpend(args, name):
|
|
|
805
805
|
setattr(args, name, attr)
|
|
806
806
|
|
|
807
807
|
|
|
808
|
+
def _deduplicate_all_flags(args):
|
|
809
|
+
"""Deduplicate all compiler and linker flags after all processing is complete"""
|
|
810
|
+
flaglist = ("CPPFLAGS", "CFLAGS", "CXXFLAGS", "LDFLAGS")
|
|
811
|
+
for flag_name in flaglist:
|
|
812
|
+
if hasattr(args, flag_name):
|
|
813
|
+
flag_value = getattr(args, flag_name)
|
|
814
|
+
if flag_value:
|
|
815
|
+
# Split the flag string into individual flags and deduplicate
|
|
816
|
+
deduplicated_flags = compiletools.utils.combine_and_deduplicate_compiler_flags(flag_value)
|
|
817
|
+
# Convert back to space-separated string
|
|
818
|
+
setattr(args, flag_name, " ".join(deduplicated_flags))
|
|
819
|
+
|
|
820
|
+
|
|
808
821
|
def _tier_one_modifications(args):
|
|
809
822
|
"""Do some early modifications that can potentially cause
|
|
810
823
|
downstream modifications.
|
|
@@ -817,6 +830,9 @@ def _tier_one_modifications(args):
|
|
|
817
830
|
for flag in flaglist:
|
|
818
831
|
_do_xxpend(args, flag)
|
|
819
832
|
|
|
833
|
+
# Deduplicate all compiler/linker flags after all processing is complete
|
|
834
|
+
_deduplicate_all_flags(args)
|
|
835
|
+
|
|
820
836
|
# Cake used preprocess to mean both magic flag preprocess and headerdeps preprocess
|
|
821
837
|
if hasattr(args, "preprocess") and args.preprocess:
|
|
822
838
|
args.magic = "cpp"
|
|
@@ -834,7 +850,7 @@ def _strip_quotes(args):
|
|
|
834
850
|
if value is not None:
|
|
835
851
|
# Can't just use the for loop directly because that would
|
|
836
852
|
# try and process every character in a string
|
|
837
|
-
if compiletools.utils.
|
|
853
|
+
if compiletools.utils.is_non_string_iterable(value):
|
|
838
854
|
for index, element in enumerate(value):
|
|
839
855
|
value[index] = _safely_unquote_string(element)
|
|
840
856
|
else:
|
|
@@ -863,7 +879,7 @@ def _safely_unquote_string(value):
|
|
|
863
879
|
try:
|
|
864
880
|
# Use shlex to parse the string as shell would
|
|
865
881
|
# If it parses to exactly one token, it was properly quoted
|
|
866
|
-
tokens =
|
|
882
|
+
tokens = split_command_cached(value)
|
|
867
883
|
if len(tokens) == 1:
|
|
868
884
|
# Single token means the quotes were shell quotes
|
|
869
885
|
unquoted = tokens[0]
|
|
@@ -98,8 +98,8 @@ class Cake(object):
|
|
|
98
98
|
cap.add(
|
|
99
99
|
"--compilation-database-output",
|
|
100
100
|
dest="compilation_database_output",
|
|
101
|
-
default=
|
|
102
|
-
help="Output filename for compilation database (default: compile_commands.json)"
|
|
101
|
+
default=None,
|
|
102
|
+
help="Output filename for compilation database (default: <gitroot>/compile_commands.json)"
|
|
103
103
|
)
|
|
104
104
|
|
|
105
105
|
cap.add(
|
|
@@ -177,7 +177,7 @@ class Cake(object):
|
|
|
177
177
|
for srcexe in filelist:
|
|
178
178
|
base = os.path.basename(srcexe)
|
|
179
179
|
destexe = compiletools.wrappedos.realpath(os.path.join(outputdir, base))
|
|
180
|
-
if compiletools.utils.
|
|
180
|
+
if compiletools.utils.is_executable(srcexe) and srcexe != destexe:
|
|
181
181
|
if self.args.verbose > 0:
|
|
182
182
|
print("".join([outputdir, base]))
|
|
183
183
|
compiletools.wrappedos.copy(srcexe, outputdir)
|
|
@@ -26,12 +26,6 @@ class CompilationDatabaseCreator:
|
|
|
26
26
|
self.magicparser = magicparser if magicparser is not None else compiletools.magicflags.create(args, self.headerdeps)
|
|
27
27
|
self.hunter = hunter if hunter is not None else compiletools.hunter.Hunter(args, self.headerdeps, self.magicparser)
|
|
28
28
|
|
|
29
|
-
def _normalize_path_sz(self, file_path: str) -> str:
|
|
30
|
-
"""Normalize file path using wrappedos with shared StringZilla-aware cache"""
|
|
31
|
-
# Use enhanced wrappedos.abspath that handles both Python str and StringZilla Str
|
|
32
|
-
return compiletools.wrappedos.abspath(file_path)
|
|
33
|
-
|
|
34
|
-
|
|
35
29
|
@staticmethod
|
|
36
30
|
def add_arguments(cap):
|
|
37
31
|
"""Add command-line arguments for standalone ct-compilation-database"""
|
|
@@ -41,8 +35,8 @@ class CompilationDatabaseCreator:
|
|
|
41
35
|
cap.add(
|
|
42
36
|
"--compilation-database-output",
|
|
43
37
|
dest="compilation_database_output",
|
|
44
|
-
default=
|
|
45
|
-
help="Output filename for compilation database (default: compile_commands.json)"
|
|
38
|
+
default=None,
|
|
39
|
+
help="Output filename for compilation database (default: <gitroot>/compile_commands.json)"
|
|
46
40
|
)
|
|
47
41
|
|
|
48
42
|
cap.add(
|
|
@@ -54,45 +48,51 @@ class CompilationDatabaseCreator:
|
|
|
54
48
|
|
|
55
49
|
def _get_compiler_command(self, source_file: str) -> List[str]:
|
|
56
50
|
"""Generate compiler command arguments for a source file with StringZilla optimization"""
|
|
57
|
-
|
|
51
|
+
|
|
58
52
|
# Determine compiler based on file extension
|
|
59
53
|
if compiletools.utils.is_cpp_source(source_file):
|
|
60
54
|
compiler = self.args.CXX
|
|
61
55
|
else:
|
|
62
56
|
compiler = self.args.CC
|
|
57
|
+
|
|
58
|
+
# Build arguments list - properly split compiler command if it contains multiple tokens
|
|
59
|
+
args = []
|
|
60
|
+
if compiler:
|
|
61
|
+
# Split compiler command (e.g., "ccache g++" -> ["ccache", "g++"])
|
|
62
|
+
compiler_parts = compiletools.utils.split_command_cached(compiler)
|
|
63
|
+
args.extend(compiler_parts)
|
|
64
|
+
else:
|
|
65
|
+
# If no compiler is set, we can't generate a valid command
|
|
66
|
+
return []
|
|
63
67
|
|
|
64
|
-
#
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
# Get magic flags for this specific file
|
|
69
|
+
try:
|
|
70
|
+
magic_flags = self.magicparser.parse(source_file)
|
|
71
|
+
except Exception as e:
|
|
72
|
+
# Magic flags parsing may fail for various reasons
|
|
73
|
+
if self.args.verbose >= 2:
|
|
74
|
+
print(f"Warning: Could not parse magic flags for {source_file}: {e}")
|
|
75
|
+
magic_flags = {}
|
|
76
|
+
|
|
77
|
+
# Combine and deduplicate all flag sources
|
|
74
78
|
if compiletools.utils.is_cpp_source(source_file):
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
# C++ source: combine CPPFLAGS + CXXFLAGS from both args and magic flags
|
|
80
|
+
combined_flags = compiletools.utils.combine_and_deduplicate_compiler_flags(
|
|
81
|
+
getattr(self.args, 'CPPFLAGS', None),
|
|
82
|
+
magic_flags.get("CPPFLAGS", []),
|
|
83
|
+
getattr(self.args, 'CXXFLAGS', None),
|
|
84
|
+
magic_flags.get("CXXFLAGS", [])
|
|
85
|
+
)
|
|
80
86
|
else:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
magic_cxxflags = self.magicparser.getmagic_cxxflags_for_file(source_file)
|
|
91
|
-
if magic_cxxflags:
|
|
92
|
-
args.extend(compiletools.utils.cached_shlex_split(magic_cxxflags))
|
|
93
|
-
except AttributeError:
|
|
94
|
-
# Magic flags methods may not exist
|
|
95
|
-
pass
|
|
87
|
+
# C source: combine CPPFLAGS + CFLAGS from both args and magic flags
|
|
88
|
+
combined_flags = compiletools.utils.combine_and_deduplicate_compiler_flags(
|
|
89
|
+
getattr(self.args, 'CPPFLAGS', None),
|
|
90
|
+
magic_flags.get("CPPFLAGS", []),
|
|
91
|
+
getattr(self.args, 'CFLAGS', None),
|
|
92
|
+
magic_flags.get("CFLAGS", [])
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
args.extend(combined_flags)
|
|
96
96
|
|
|
97
97
|
# Add compile-only flag
|
|
98
98
|
args.extend(["-c"])
|
|
@@ -101,25 +101,29 @@ class CompilationDatabaseCreator:
|
|
|
101
101
|
if self.args.compilation_database_relative:
|
|
102
102
|
args.append(os.path.relpath(source_file, os.getcwd()))
|
|
103
103
|
else:
|
|
104
|
-
args.append(os.path.
|
|
104
|
+
args.append(os.path.realpath(source_file))
|
|
105
105
|
|
|
106
106
|
return args
|
|
107
107
|
|
|
108
108
|
def _create_command_object(self, source_file: str) -> Dict[str, Any]:
|
|
109
109
|
"""Create a single command object for the compilation database"""
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
# Directory is always absolute (working directory)
|
|
112
|
-
directory = os.path.
|
|
113
|
-
|
|
112
|
+
directory = os.path.realpath(os.getcwd())
|
|
113
|
+
|
|
114
114
|
# Get file path - relative or absolute based on option
|
|
115
115
|
if self.args.compilation_database_relative:
|
|
116
116
|
file_path = os.path.relpath(source_file, os.getcwd())
|
|
117
117
|
else:
|
|
118
|
-
file_path = os.path.
|
|
119
|
-
|
|
118
|
+
file_path = os.path.realpath(source_file)
|
|
119
|
+
|
|
120
120
|
# Generate arguments
|
|
121
121
|
arguments = self._get_compiler_command(source_file)
|
|
122
|
-
|
|
122
|
+
|
|
123
|
+
# Skip files with empty arguments arrays - they provide no compile context
|
|
124
|
+
if not arguments:
|
|
125
|
+
return None
|
|
126
|
+
|
|
123
127
|
return {
|
|
124
128
|
"directory": directory,
|
|
125
129
|
"file": file_path,
|
|
@@ -149,7 +153,10 @@ class CompilationDatabaseCreator:
|
|
|
149
153
|
for source_file in source_files:
|
|
150
154
|
if os.path.exists(source_file):
|
|
151
155
|
command_obj = self._create_command_object(source_file)
|
|
152
|
-
|
|
156
|
+
if command_obj is not None:
|
|
157
|
+
commands.append(command_obj)
|
|
158
|
+
elif self.args.verbose >= 2:
|
|
159
|
+
print(f"Warning: Skipping source file with empty arguments: {source_file}")
|
|
153
160
|
elif self.args.verbose >= 2:
|
|
154
161
|
print(f"Warning: Source file does not exist: {source_file}")
|
|
155
162
|
|
|
@@ -159,7 +166,7 @@ class CompilationDatabaseCreator:
|
|
|
159
166
|
"""Write the compilation database to file with incremental update support"""
|
|
160
167
|
|
|
161
168
|
if output_file is None:
|
|
162
|
-
output_file = self.
|
|
169
|
+
output_file = self.namer.compilation_database_pathname()
|
|
163
170
|
|
|
164
171
|
# Create the command objects for current files
|
|
165
172
|
new_commands = self.create_compilation_database()
|
|
@@ -186,15 +193,21 @@ class CompilationDatabaseCreator:
|
|
|
186
193
|
# Merge: Keep existing entries for files we're not updating using StringZilla operations
|
|
187
194
|
merged_commands = []
|
|
188
195
|
|
|
189
|
-
#
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
196
|
+
# Use StringZilla for optimal path processing performance
|
|
197
|
+
# Build set of normalized file paths from new commands
|
|
198
|
+
new_files_normalized = set()
|
|
199
|
+
for cmd in new_commands:
|
|
200
|
+
# Convert to StringZilla for optimal caching, then back to str for set
|
|
201
|
+
file_sz = sz.Str(cmd["file"])
|
|
202
|
+
normalized_sz = compiletools.wrappedos.realpath_sz(file_sz)
|
|
203
|
+
new_files_normalized.add(str(normalized_sz))
|
|
204
|
+
|
|
205
|
+
# Process existing commands with StringZilla optimization
|
|
193
206
|
for existing_cmd in existing_commands:
|
|
194
|
-
#
|
|
207
|
+
# Convert to StringZilla for consistent processing
|
|
195
208
|
existing_file_sz = sz.Str(existing_cmd["file"])
|
|
196
|
-
|
|
197
|
-
if
|
|
209
|
+
existing_normalized_sz = compiletools.wrappedos.realpath_sz(existing_file_sz)
|
|
210
|
+
if str(existing_normalized_sz) not in new_files_normalized:
|
|
198
211
|
merged_commands.append(existing_cmd)
|
|
199
212
|
|
|
200
213
|
# Add all new/updated entries
|
|
@@ -202,8 +215,14 @@ class CompilationDatabaseCreator:
|
|
|
202
215
|
|
|
203
216
|
# Write merged JSON file
|
|
204
217
|
try:
|
|
205
|
-
|
|
206
|
-
|
|
218
|
+
# Ensure the output directory exists
|
|
219
|
+
output_dir = compiletools.wrappedos.dirname(output_file)
|
|
220
|
+
if output_dir and not compiletools.wrappedos.isdir(output_dir):
|
|
221
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
222
|
+
|
|
223
|
+
# Use StringZilla Str.write_to for faster file writing - no GIL, no copies
|
|
224
|
+
json_content = json.dumps(merged_commands, indent=2, ensure_ascii=False)
|
|
225
|
+
sz.Str(json_content).write_to(output_file)
|
|
207
226
|
|
|
208
227
|
if self.args.verbose:
|
|
209
228
|
print(f"Written compilation database with {len(merged_commands)} entries to {output_file}")
|
|
@@ -21,12 +21,12 @@ class IndentStyle(compiletools.git_utils.NameAdjuster):
|
|
|
21
21
|
|
|
22
22
|
class HeaderPassFilter(object):
|
|
23
23
|
def __call__(self, files):
|
|
24
|
-
return {fn for fn in files if compiletools.utils.
|
|
24
|
+
return {fn for fn in files if compiletools.utils.is_header(fn)}
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class SourcePassFilter(object):
|
|
28
28
|
def __call__(self, files):
|
|
29
|
-
return {fn for fn in files if compiletools.utils.
|
|
29
|
+
return {fn for fn in files if compiletools.utils.is_source(fn)}
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class AllPassFilter(object):
|
|
@@ -151,7 +151,7 @@ class FindTargets(object):
|
|
|
151
151
|
continue
|
|
152
152
|
for filename in files:
|
|
153
153
|
pathname = os.path.join(root, filename)
|
|
154
|
-
if not compiletools.utils.
|
|
154
|
+
if not compiletools.utils.is_source(pathname):
|
|
155
155
|
continue
|
|
156
156
|
with open(pathname, encoding="utf-8", errors="ignore") as ff:
|
|
157
157
|
for line in ff:
|
|
@@ -7,7 +7,7 @@ from pprint import pprint
|
|
|
7
7
|
import compiletools.wrappedos
|
|
8
8
|
import compiletools.apptools
|
|
9
9
|
import compiletools.utils
|
|
10
|
-
from compiletools.utils import
|
|
10
|
+
from compiletools.utils import split_command_cached
|
|
11
11
|
import compiletools.tree as tree
|
|
12
12
|
import compiletools.preprocessor
|
|
13
13
|
import compiletools.compiler_macros
|
|
@@ -92,7 +92,7 @@ class HeaderDepsBase(object):
|
|
|
92
92
|
|
|
93
93
|
# Split the flag string into individual tokens using shell parsing
|
|
94
94
|
try:
|
|
95
|
-
tokens =
|
|
95
|
+
tokens = split_command_cached(flag_value)
|
|
96
96
|
except ValueError:
|
|
97
97
|
# Fall back to simple split if shlex fails
|
|
98
98
|
tokens = flag_value.split()
|
|
@@ -133,7 +133,7 @@ class HeaderDepsBase(object):
|
|
|
133
133
|
|
|
134
134
|
# Split the flag string into individual tokens using shell parsing
|
|
135
135
|
try:
|
|
136
|
-
tokens =
|
|
136
|
+
tokens = split_command_cached(flag_value)
|
|
137
137
|
except ValueError:
|
|
138
138
|
# Fall back to simple split if shlex fails
|
|
139
139
|
tokens = flag_value.split()
|
|
@@ -76,7 +76,7 @@ class Hunter(object):
|
|
|
76
76
|
|
|
77
77
|
# One of the magic flags is SOURCE. If that was present, add to the
|
|
78
78
|
# file list.
|
|
79
|
-
if self.args.allow_magic_source_in_header or compiletools.utils.
|
|
79
|
+
if self.args.allow_magic_source_in_header or compiletools.utils.is_source(realpath):
|
|
80
80
|
todo.extend(self._extractSOURCE(realpath))
|
|
81
81
|
|
|
82
82
|
# The header deps and magic flags have been parsed at this point so it
|
|
@@ -116,7 +116,7 @@ class Hunter(object):
|
|
|
116
116
|
[
|
|
117
117
|
filename
|
|
118
118
|
for filename in self.required_files(filename)
|
|
119
|
-
if compiletools.utils.
|
|
119
|
+
if compiletools.utils.is_source(filename)
|
|
120
120
|
]
|
|
121
121
|
)
|
|
122
122
|
|
|
@@ -155,7 +155,7 @@ class Hunter(object):
|
|
|
155
155
|
compiletools.headerdeps.HeaderDepsBase.clear_cache()
|
|
156
156
|
compiletools.magicflags.MagicFlagsBase.clear_cache()
|
|
157
157
|
# Clear class-level cache
|
|
158
|
-
Hunter._magic_cache.clear()
|
|
158
|
+
# Hunter._magic_cache.clear() # This cache doesn't exist
|
|
159
159
|
# Note: Cannot clear instance-level _parse_magic caches from static method
|
|
160
160
|
# Each Hunter instance will retain its own cache until the instance is destroyed
|
|
161
161
|
|
|
@@ -264,7 +264,7 @@ class Hunter(object):
|
|
|
264
264
|
all_sources.add(compiletools.wrappedos.realpath(source))
|
|
265
265
|
|
|
266
266
|
# Cache the results as sorted absolute paths
|
|
267
|
-
self._hunted_sources = sorted(
|
|
267
|
+
self._hunted_sources = sorted(all_sources) # all_sources already contains realpaths
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
if self.args.verbose >= 5:
|
|
@@ -248,9 +248,14 @@ class MagicFlagsBase:
|
|
|
248
248
|
# Pass magic_flag data and filepath for structured processing
|
|
249
249
|
self._process_magic_flag(magic, flag, flagsforfilename, magic_flag, filepath)
|
|
250
250
|
|
|
251
|
-
#
|
|
251
|
+
# Merge deprecated LINKFLAGS into LDFLAGS before deduplication
|
|
252
|
+
if "LINKFLAGS" in flagsforfilename:
|
|
253
|
+
flagsforfilename["LDFLAGS"].extend(flagsforfilename["LINKFLAGS"])
|
|
254
|
+
del flagsforfilename["LINKFLAGS"]
|
|
255
|
+
|
|
256
|
+
# Deduplicate all flags while preserving order, with smart compiler flag handling
|
|
252
257
|
for key in flagsforfilename:
|
|
253
|
-
flagsforfilename[key] = compiletools.utils.
|
|
258
|
+
flagsforfilename[key] = compiletools.utils.deduplicate_compiler_flags(flagsforfilename[key])
|
|
254
259
|
|
|
255
260
|
return flagsforfilename
|
|
256
261
|
|
|
@@ -274,7 +279,9 @@ class MagicFlagsBase:
|
|
|
274
279
|
for value in values:
|
|
275
280
|
flagsforfilename[key].append(value)
|
|
276
281
|
|
|
277
|
-
|
|
282
|
+
# Split flag string into individual flags - all magic flags can contain multiple values
|
|
283
|
+
individual_flags = compiletools.utils.split_command_cached(flag)
|
|
284
|
+
flagsforfilename[magic].extend(individual_flags)
|
|
278
285
|
if self._args.verbose >= 5:
|
|
279
286
|
print(
|
|
280
287
|
"Using magic flag {0}={1} extracted from {2}".format(
|
|
@@ -291,7 +298,7 @@ class MagicFlagsBase:
|
|
|
291
298
|
DirectMagicFlags.clear_cache()
|
|
292
299
|
CppMagicFlags.clear_cache()
|
|
293
300
|
# Clear LRU caches
|
|
294
|
-
compiletools.utils.
|
|
301
|
+
compiletools.utils.split_command_cached.cache_clear()
|
|
295
302
|
|
|
296
303
|
|
|
297
304
|
class DirectMagicFlags(MagicFlagsBase):
|