fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
980b6628
patching
1load ( "@rules_cc//cc:defs.bzl" , "cc_import" , "cc_library" ) 2load ( "@rules_rust//rust:defs.bzl" , "rust_shared_library" ) 3 4# A rust_shared_library (forcing the use of pic) that depends on a native 5# linker library with only a static_library member. 6rust_shared_library ( 7name = "rust_shared_lib_with_static_dep" , 8srcs = [ "rust_shared_lib_with_static_dep.rs" ], 9deps = [ ":static_cclib" ], 10) 11 12cc_library ( 13name = "nonstandard_name_cc_lib" , 14srcs = [ "cc_library_with_func.cc" ], 15) 16 17genrule ( 18name = "nonstandard_name_gen" , 19srcs = [ ":nonstandard_name_cc_lib" ], 20outs = [ "nonstandard_name_gen.a" ], 21# Copy the first member (libnonstandard_name_cc_lib.a) from the srcs to the 22# output nonstandard_name_gen.a. 23cmd = "cp $$(awk '{print $$1}' <<< '$(SRCS)') $@" , 24) 25 26cc_import ( 27name = "static_cclib" , 28static_library = "nonstandard_name_gen.a" , 29)