Skip to content

Commit

Permalink
feat(makefile) Use comma to separate Cargo features in `compiler_feat…
Browse files Browse the repository at this point in the history
…ures`.
  • Loading branch information
Hywan committed Feb 15, 2021
1 parent 95dcb04 commit 6721769
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,12 @@ ifeq ($(use_system_ffi), 1)
capi_default_features := --features system-libffi
endif

# Small trick to define a space and a comma.
space := $() $()
comma := ,

# Define the default Cargo features for all crates.
compiler_features_spaced := $(foreach compiler,$(compilers),$(compiler))
compiler_features := --features "$(compiler_features_spaced)"
compiler_features := --features $(subst $(space),$(comma),$(strip $(compilers)))


#####
Expand Down

0 comments on commit 6721769

Please sign in to comment.