Skip to content

Commit ab2ee7a

Browse files
committed
Use option "-sf" for the AIX "ln" command.
1 parent bc145ce commit ab2ee7a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/run-make/libs-through-symlinks/Makefile

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@ include ../tools.mk
33

44
# ignore-windows
55

6+
# The option -n for the AIX ln command has a different purpose than it does
7+
# on Linux. On Linux, the -n option is used to treat the destination path as
8+
# normal file if it is a symbolic link to a directory, which is the default
9+
# behavior of the AIX ln command.
10+
ifeq ($(UNAME),AIX)
11+
LN_FLAGS := -sf
12+
else
13+
LN_FLAGS := -nsf
14+
endif
15+
616
NAME := $(shell $(RUSTC) --print file-names foo.rs)
717

818
all:
919
mkdir -p $(TMPDIR)/outdir
1020
$(RUSTC) foo.rs -o $(TMPDIR)/outdir/$(NAME)
11-
ln -nsf outdir/$(NAME) $(TMPDIR)
21+
ln $(LN_FLAGS) outdir/$(NAME) $(TMPDIR)
1222
RUSTC_LOG=rustc_metadata::loader $(RUSTC) bar.rs

0 commit comments

Comments
 (0)