1"""Cc toolchain definitions for use on wasm platforms""" 2 3def _dummy_cc_toolchain_impl(_ctx): 4 # The `all_files` attribute is referenced by rustc_compile_action(). 5 return [platform_common.ToolchainInfo(all_files = depset([]))] 6 7dummy_cc_toolchain = rule( 8 implementation = _dummy_cc_toolchain_impl, 9 attrs = {}, 10) 11 12# dummy values from https://bazel.build/tutorials/ccp-toolchain-config#configuring_the_c_toolchain 13def _config_impl(ctx): 14 return cc_common.create_cc_toolchain_config_info( 15 ctx = ctx, 16 toolchain_identifier = "dummy-wasm32-cc-toolchain", 17 host_system_name = "unknown", 18 target_system_name = "unknown", 19 target_cpu = "unknown", 20 target_libc = "unknown", 21 compiler = "unknown", 22 abi_version = "unknown", 23 abi_libc_version = "unknown", 24 ) 25 26dummy_cc_config = rule( 27 implementation = _config_impl, 28 attrs = {}, 29 provides = [CcToolchainConfigInfo], 30) 31