From 8aeae026d112ff9811a424e31621c05682f4a72e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 18 Apr 2023 09:23:24 +0200 Subject: Add support for Assembler with C Preprocessor (.S) compilation Specifically, the c module now provides the c.as-cpp submodules which can be loaded in order to register the S{} target type and enable Assembler with C Preprocessor compilation in the c compile rule. For details, refer to "Assembler with C Preprocessor Compilation" in the manual. --- libbuild2/cc/target.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libbuild2/cc/target.cxx') diff --git a/libbuild2/cc/target.cxx b/libbuild2/cc/target.cxx index d743752..6c5d7c8 100644 --- a/libbuild2/cc/target.cxx +++ b/libbuild2/cc/target.cxx @@ -66,6 +66,20 @@ namespace build2 target_type::flag::none }; + extern const char S_ext_def[] = "S"; + const target_type S::static_type + { + "S", + &cc::static_type, + &target_factory, + nullptr, /* fixed_extension */ + &target_extension_var, + &target_pattern_var, + nullptr, + &file_search, + target_type::flag::none + }; + extern const char pc_ext[] = "pc"; // VC14 rejects constexpr. const target_type pc::static_type { -- cgit v1.1