Skip to content

Commit 93c09f3

Browse files
committed
wip: makefile crimes for MacOS FIPS
There has to be a better way....
1 parent 6732976 commit 93c09f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
PROFILE := release
2+
13
ifeq ($(shell uname),Darwin)
4+
ifeq ($(FIPS), true)
5+
AWS_LC_FIPS_LIB_PATH := $(shell cargo build --profile $(PROFILE) --features=fips --message-format=json | jq -r 'select(.package_id | contains("aws-lc-fips-sys")) | select(.linked_paths != null) | .linked_paths[0]' | cut -d= -f2)
6+
LDFLAGS := -Wl,-dead_strip -framework Security -framework Foundation -L$(AWS_LC_FIPS_LIB_PATH) -l aws_lc_fips_0_12_13_crypto
7+
else
28
LDFLAGS := -Wl,-dead_strip -framework Security -framework Foundation
9+
endif
310
else
411
LDFLAGS := -Wl,--gc-sections -lpthread -ldl
512
endif
@@ -8,7 +15,6 @@ CARGO ?= cargo
815
CARGOFLAGS += --locked
916

1017
CFLAGS := -Werror -Wall -Wextra -Wpedantic -g -I src/
11-
PROFILE := release
1218
CRYPTO_PROVIDER := aws-lc-rs
1319
COMPRESSION := false
1420
FIPS := false

0 commit comments

Comments
 (0)