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.
Files changed (276) hide show
  1. {compiletools-5.3.0 → compiletools-5.3.3}/PKG-INFO +3 -3
  2. {compiletools-5.3.0 → compiletools-5.3.3}/pyproject.toml +3 -3
  3. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-cache-clean.rst +1 -1
  4. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-cache.rst +1 -1
  5. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-cake.rst +1 -1
  6. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-commandline.rst +1 -1
  7. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-config.rst +1 -1
  8. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-doc.rst +1 -1
  9. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-filelist.rst +1 -1
  10. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-findtargets.rst +1 -1
  11. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-gitroot.rst +1 -1
  12. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-headertree.rst +1 -1
  13. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-jobs.rst +1 -1
  14. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-list-variants.rst +1 -1
  15. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-magicflags.rst +1 -1
  16. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/apptools.py +22 -6
  17. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/cake.py +3 -3
  18. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/compilation_database.py +76 -57
  19. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/filelist.py +2 -2
  20. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/findtargets.py +1 -1
  21. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/git_utils.py +1 -1
  22. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/headerdeps.py +3 -3
  23. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/hunter.py +4 -4
  24. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/magicflags.py +11 -4
  25. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/makefile.py +3 -4
  26. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/namer.py +14 -0
  27. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/preprocessor.py +1 -1
  28. compiletools-5.3.3/src/compiletools/samples/duplicate_flags/main.cpp +37 -0
  29. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_base.py +2 -2
  30. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cake.py +3 -3
  31. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_compilation_database.py +112 -16
  32. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_findtargets.py +1 -0
  33. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_library.py +1 -1
  34. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_magicflags.py +131 -1
  35. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_magicpkgconfig.py +6 -4
  36. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_makefile.py +1 -1
  37. compiletools-5.3.3/src/compiletools/test_utils.py +166 -0
  38. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/testhelper.py +3 -0
  39. compiletools-5.3.3/src/compiletools/utils.py +426 -0
  40. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/version.py +1 -1
  41. compiletools-5.3.3/src/compiletools/wrappedos.py +117 -0
  42. compiletools-5.3.0/src/compiletools/test_utils.py +0 -93
  43. compiletools-5.3.0/src/compiletools/utils.py +0 -176
  44. compiletools-5.3.0/src/compiletools/wrappedos.py +0 -108
  45. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/README.ct-cppdeps.rst +0 -0
  46. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/__init__.py +0 -0
  47. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/benchmark_file_analyzer_cache.py +0 -0
  48. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/compiler_macros.py +0 -0
  49. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/config.py +0 -0
  50. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/configutils.py +0 -0
  51. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/cppdeps.py +0 -0
  52. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/create_cmakelists.py +0 -0
  53. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/blank.conf +0 -0
  54. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/blank.release.conf +0 -0
  55. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/clang.debug.conf +0 -0
  56. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/clang.release.conf +0 -0
  57. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/ct.conf +0 -0
  58. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/gcc.debug.conf +0 -0
  59. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/ct.conf.d/gcc.release.conf +0 -0
  60. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/dirnamer.py +0 -0
  61. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/diskcache.py +0 -0
  62. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/doc.py +0 -0
  63. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/file_analyzer.py +0 -0
  64. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/file_analyzer_cache.py +0 -0
  65. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/git_sha_report.py +0 -0
  66. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/global_hash_registry.py +0 -0
  67. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/headertree.py +0 -0
  68. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/jobs.py +0 -0
  69. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/listvariants.py +0 -0
  70. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/memoize.py +0 -0
  71. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/mmap_oracle_cache.py +0 -0
  72. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/add.C +0 -0
  73. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/add.H +0 -0
  74. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/calculator.cpp +0 -0
  75. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/calculator.h +0 -0
  76. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/calculator/main.cpp +0 -0
  77. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/conditional_includes/linux_header.h +0 -0
  78. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/conditional_includes/main.cpp +0 -0
  79. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/conditional_includes/windows_header.h +0 -0
  80. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/aarch64_feature.hpp +0 -0
  81. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/advanced_feature.hpp +0 -0
  82. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/advanced_preprocessor_header.hpp +0 -0
  83. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/advanced_preprocessor_test.cpp +0 -0
  84. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/alt_form_feature.hpp +0 -0
  85. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/arm_feature.hpp +0 -0
  86. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/armcc_feature.hpp +0 -0
  87. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/avx2_optimization.hpp +0 -0
  88. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/basic_feature.hpp +0 -0
  89. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cache_profiler.hpp +0 -0
  90. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/certificate_validation.hpp +0 -0
  91. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cflags_feature.hpp +0 -0
  92. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/clang_feature.hpp +0 -0
  93. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/combined_features.hpp +0 -0
  94. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/compiler_builtin_header.hpp +0 -0
  95. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/compiler_builtin_test.cpp +0 -0
  96. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/conditional_header.hpp +0 -0
  97. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cppflags_feature.hpp +0 -0
  98. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cpu_profiler.hpp +0 -0
  99. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/custom_allocator.hpp +0 -0
  100. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/cxxflags_feature.hpp +0 -0
  101. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/default_feature.hpp +0 -0
  102. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/detailed_profiler.hpp +0 -0
  103. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/elif_header.hpp +0 -0
  104. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/elif_test.cpp +0 -0
  105. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/emscripten_feature.hpp +0 -0
  106. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/expert_feature.hpp +0 -0
  107. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/expert_mode_base.hpp +0 -0
  108. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/fma_optimization.hpp +0 -0
  109. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/gcc_feature.hpp +0 -0
  110. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/high_optimization.hpp +0 -0
  111. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/intel_feature.hpp +0 -0
  112. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/leak_detector.hpp +0 -0
  113. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/linux_advanced.hpp +0 -0
  114. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/linux_epoll_threading.hpp +0 -0
  115. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/linux_feature.hpp +0 -0
  116. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/main.cpp +0 -0
  117. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/memory_profiler.hpp +0 -0
  118. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/memory_tracker.hpp +0 -0
  119. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/msvc_feature.hpp +0 -0
  120. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/multi_flag_header.hpp +0 -0
  121. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/multi_flag_test.cpp +0 -0
  122. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/nested_macros_header.hpp +0 -0
  123. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/nested_macros_test.cpp +0 -0
  124. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/networking_base.hpp +0 -0
  125. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/numa_threading.hpp +0 -0
  126. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/partial_features.hpp +0 -0
  127. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/profiling_base.hpp +0 -0
  128. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/riscv_feature.hpp +0 -0
  129. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/simd_optimization.hpp +0 -0
  130. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/ssl_networking.hpp +0 -0
  131. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/stack_tracer.hpp +0 -0
  132. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/strict_cert_validation.hpp +0 -0
  133. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/tcc_feature.hpp +0 -0
  134. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/temp_defined.hpp +0 -0
  135. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/temp_still_defined.hpp +0 -0
  136. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version1_feature.hpp +0 -0
  137. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version2_feature.hpp +0 -0
  138. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version3_feature.hpp +0 -0
  139. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version_205_plus.hpp +0 -0
  140. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/version_ge_2_feature.hpp +0 -0
  141. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/windows_advanced.hpp +0 -0
  142. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/windows_iocp.hpp +0 -0
  143. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/windows_iocp_threading.hpp +0 -0
  144. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cppflags_macros/x86_64_feature.hpp +0 -0
  145. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/cross_platform.cpp +0 -0
  146. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/cross_platform.hpp +0 -0
  147. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/cross_platform_lin.cpp +0 -0
  148. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/cross_platform_win.cpp +0 -0
  149. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cross_platform/test_source.cpp +0 -0
  150. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cycle/cycle_a.hpp +0 -0
  151. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cycle/cycle_b.hpp +0 -0
  152. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/cycle/cycle_c.hpp +0 -0
  153. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/d1/d1.cpp +0 -0
  154. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/d1/d1.hpp +0 -0
  155. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/d2/d2.cpp +0 -0
  156. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/d2/d2.hpp +0 -0
  157. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/dottypaths/dottypaths.cpp +0 -0
  158. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/a_widget.cpp +0 -0
  159. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/a_widget.hpp +0 -0
  160. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/red_herring_c_style_2.hpp +0 -0
  161. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/test_factory.cpp +0 -0
  162. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/widget.hpp +0 -0
  163. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/widget_factory.cpp +0 -0
  164. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/widget_factory.hpp +0 -0
  165. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/z_widget.cpp +0 -0
  166. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/factory/z_widget.hpp +0 -0
  167. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/database.h +0 -0
  168. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/feature_config.h +0 -0
  169. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/graphics.h +0 -0
  170. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/logging.h +0 -0
  171. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/main.cpp +0 -0
  172. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/feature_headers/networking.h +0 -0
  173. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/isystem_include_bug/fake_system_include/system/version.h +0 -0
  174. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/isystem_include_bug/main.cpp +0 -0
  175. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/ldflags/conditional_ldflags_test.cpp +0 -0
  176. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/ldflags/version_dependent_ldflags.cpp +0 -0
  177. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/ldflags/version_macro.hpp +0 -0
  178. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/build.sh +0 -0
  179. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/main.cpp +0 -0
  180. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_double.cpp +0 -0
  181. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_double.hpp +0 -0
  182. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_int.cpp +0 -0
  183. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_int.hpp +0 -0
  184. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_numbers.cpp +0 -0
  185. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/library/mylib/get_numbers.hpp +0 -0
  186. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/lotsofmagic/lotsofmagic.cpp +0 -0
  187. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_deps/feature_header.hpp +0 -0
  188. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_deps/feature_x_impl.cpp +0 -0
  189. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_deps/feature_y_impl.cpp +0 -0
  190. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_deps/main.cpp +0 -0
  191. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/README.md +0 -0
  192. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/clean_main.cpp +0 -0
  193. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/config.h +0 -0
  194. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/core.h +0 -0
  195. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/debug.h +0 -0
  196. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/feature.h +0 -0
  197. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/main.cpp +0 -0
  198. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/module_b.h +0 -0
  199. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/pytest_test.py +0 -0
  200. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/release.h +0 -0
  201. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/sample.cpp +0 -0
  202. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/test_exposes_bug.py +0 -0
  203. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/test_macro_state_bug.py +0 -0
  204. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/macro_state_dependency/test_macro_state_dependency.py +0 -0
  205. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/complex_header.h +0 -0
  206. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/complex_test.cpp +0 -0
  207. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/macro_header.h +0 -0
  208. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/test_macro_transform.cpp +0 -0
  209. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magic_processing_order/traits_header.h +0 -0
  210. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicinclude/main.cpp +0 -0
  211. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicinclude/subdir/important.hpp +0 -0
  212. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicinclude/subdir2/important2.hpp +0 -0
  213. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicinclude/subdir3/important3.hpp +0 -0
  214. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicpkgconfig/main.cpp +0 -0
  215. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/include_dir/some_header.hpp +0 -0
  216. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/include_dir/sub_dir/another_header.hpp +0 -0
  217. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/include_dir/sub_dir/the_code_lin.cpp +0 -0
  218. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/include_dir/sub_dir/the_code_win.cpp +0 -0
  219. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/magicsourceinheader/main.cpp +0 -0
  220. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/movingheaders/main.cpp +0 -0
  221. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/movingheaders/someheader.hpp +0 -0
  222. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/nestedconfig/gcc.debug.conf +0 -0
  223. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/nestedconfig/nc.cpp +0 -0
  224. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/nestedconfig/subdir/gcc.debug.conf +0 -0
  225. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/nestedconfig/subdir/nc.cpp +0 -0
  226. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_double.cpp +0 -0
  227. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_double.hpp +0 -0
  228. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_int.cpp +0 -0
  229. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_int.hpp +0 -0
  230. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_numbers.cpp +0 -0
  231. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/get_numbers.hpp +0 -0
  232. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/test_direct_include.cpp +0 -0
  233. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/numbers/test_library.cpp +0 -0
  234. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/pkgconfig/main.cpp +0 -0
  235. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/README.txt +0 -0
  236. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/createfile.cpp +0 -0
  237. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/createfile.hpp +0 -0
  238. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/filename.hpp +0 -0
  239. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/obtainlock.cpp +0 -0
  240. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/obtainlock.hpp +0 -0
  241. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/test_flock_1.cpp +0 -0
  242. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/serialise_tests/test_flock_2.cpp +0 -0
  243. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/simple/helloworld_c.c +0 -0
  244. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/simple/helloworld_cpp.cpp +0 -0
  245. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/simple/test_cflags.c +0 -0
  246. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/api_config.h +0 -0
  247. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/api_config_new.h +0 -0
  248. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/test_main.cpp +0 -0
  249. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/test_main_new.cpp +0 -0
  250. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/version.h +0 -0
  251. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/samples/version_dependent_api/version_new.h +0 -0
  252. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/simple_preprocessor.py +0 -0
  253. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_apptools.py +0 -0
  254. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cache_performance.py +0 -0
  255. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cache_versioning.py +0 -0
  256. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cap.py +0 -0
  257. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_compiler_macros.py +0 -0
  258. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_configutils.py +0 -0
  259. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_cppdeps.py +0 -0
  260. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_ctcache_conflicts.py +0 -0
  261. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_ctcache_type_config.py +0 -0
  262. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_environment_assumptions.py +0 -0
  263. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_file_analyzer.py +0 -0
  264. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_file_analyzer_integration.py +0 -0
  265. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_headerdeps.py +0 -0
  266. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_hunter.py +0 -0
  267. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_listvariants.py +0 -0
  268. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_macro_state_dependency.py +0 -0
  269. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_magicinclude.py +0 -0
  270. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_mmap_oracle_cache.py +0 -0
  271. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_movingheaders.py +0 -0
  272. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_namer.py +0 -0
  273. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_serialisetests.py +0 -0
  274. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/test_simple_preprocessor.py +0 -0
  275. {compiletools-5.3.0 → compiletools-5.3.3}/src/compiletools/tree.py +0 -0
  276. {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.0
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.3.0 ; extra == 'dev'
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.0
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.0"
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.3.0",
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.0"
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 @@ Remove the current dependency cache
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2018-02-23
11
11
  :Copyright: Copyright (C) 2011-2018 Zomojo Pty Ltd
12
- :Version: 5.3.0
12
+ :Version: 5.3.3
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -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.0
12
+ :Version: 5.3.3
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ Swiss army knife for building a C/C++ project
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2018-02-06
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.0
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.0
12
+ :Version: 5.3.3
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ Helper tool for examining ct-* configuration
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2016-08-16
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.0
12
+ :Version: 5.3.3
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -12,7 +12,7 @@ C/C++ build tools that requires almost no configuration.
12
12
  :Author: drgeoffathome@gmail.com
13
13
  :Date: 2016-08-09
14
14
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
15
- :Version: 5.3.0
15
+ :Version: 5.3.3
16
16
  :Manual section: 1
17
17
  :Manual group: developers
18
18
 
@@ -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.0
12
+ :Version: 5.3.3
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ What
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2018-04-17
11
11
  :Copyright: Copyright (C) 2011-2018 Zomojo Pty Ltd
12
- :Version: 5.3.0
12
+ :Version: 5.3.3
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ What directory is the root of the git repository?
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2017-09-28
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.0
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.0
12
+ :Version: 5.3.3
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ How many jobs to run concurrently by the ct-* applications.
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2017-04-28
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.0
12
+ :Version: 5.3.3
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ Locates available variants for use by the ct-* applications
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2016-08-16
11
11
  :Copyright: Copyright (C) 2011-2016 Zomojo Pty Ltd
12
- :Version: 5.3.0
12
+ :Version: 5.3.3
13
13
  :Manual section: 1
14
14
  :Manual group: developers
15
15
 
@@ -9,7 +9,7 @@ Show the magic flags / magic comments that a file exports
9
9
  :Author: drgeoffathome@gmail.com
10
10
  :Date: 2018-02-23
11
11
  :Copyright: Copyright (C) 2011-2018 Zomojo Pty Ltd
12
- :Version: 5.3.0
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 cached_shlex_split
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 cached_shlex_split
365
+ # Use existing shlex functionality from split_command_cached
366
366
  try:
367
- tokens = cached_shlex_split(flag_value)
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 = cached_shlex_split(flag_string)
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.is_nonstr_iter(value):
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 = cached_shlex_split(value)
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="compile_commands.json",
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.isexecutable(srcexe) and srcexe != destexe:
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="compile_commands.json",
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
- # Build arguments list
65
- args = [compiler]
66
-
67
- # Add standard flags
68
- if hasattr(self.args, 'CPPFLAGS') and self.args.CPPFLAGS:
69
- if isinstance(self.args.CPPFLAGS, list):
70
- args.extend(self.args.CPPFLAGS)
71
- else:
72
- args.extend(compiletools.utils.cached_shlex_split(self.args.CPPFLAGS))
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
- if hasattr(self.args, 'CXXFLAGS') and self.args.CXXFLAGS:
76
- if isinstance(self.args.CXXFLAGS, list):
77
- args.extend(self.args.CXXFLAGS)
78
- else:
79
- args.extend(compiletools.utils.cached_shlex_split(self.args.CXXFLAGS))
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
- if hasattr(self.args, 'CFLAGS') and self.args.CFLAGS:
82
- args.extend(compiletools.utils.cached_shlex_split(self.args.CFLAGS))
83
-
84
- # Add magic flags for this specific file
85
- try:
86
- magic_cppflags = self.magicparser.getmagic_cppflags_for_file(source_file)
87
- if magic_cppflags:
88
- args.extend(compiletools.utils.cached_shlex_split(magic_cppflags))
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.abspath(source_file))
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.abspath(os.getcwd())
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.abspath(source_file)
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
- commands.append(command_obj)
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.args.compilation_database_output
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
- # Get set of files being updated using StringZilla-optimized path normalization
190
- new_files = {self._normalize_path_sz(cmd["file"]) for cmd in new_commands}
191
-
192
- # Always use StringZilla for consistent file path operations
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
- # Use StringZilla Str and wrappedos for efficient path operations
207
+ # Convert to StringZilla for consistent processing
195
208
  existing_file_sz = sz.Str(existing_cmd["file"])
196
- existing_file_normalized = self._normalize_path_sz(existing_file_sz)
197
- if existing_file_normalized not in new_files:
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
- with open(output_file, 'w', encoding='utf-8') as f:
206
- json.dump(merged_commands, f, indent=2, ensure_ascii=False)
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.isheader(fn)}
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.issource(fn)}
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.issource(pathname):
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:
@@ -66,7 +66,7 @@ class Project(object):
66
66
  if self._args.git_root:
67
67
  return strip_git_root(filename)
68
68
  else:
69
- return compiletools.utils.removemount(filename)
69
+ return compiletools.utils.remove_mount(filename)
70
70
 
71
71
 
72
72
  class NameAdjuster(object):
@@ -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 cached_shlex_split
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 = cached_shlex_split(flag_value)
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 = cached_shlex_split(flag_value)
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.issource(realpath):
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.issource(filename)
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(compiletools.wrappedos.realpath(src) for src in all_sources)
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
- # Deduplicate all flags while preserving order
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.ordered_unique(flagsforfilename[key])
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
- flagsforfilename[magic].append(flag)
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.cached_shlex_split.cache_clear()
301
+ compiletools.utils.split_command_cached.cache_clear()
295
302
 
296
303
 
297
304
  class DirectMagicFlags(MagicFlagsBase):