Skip to content

Commit d870f8e

Browse files
Rollup merge of rust-lang#133980 - xingxue-ibm:ln-option-aix, r=jieyouxu
[AIX] Remove option "-n" from AIX "ln" command The option `-n` for the AIX `ln` command has a different purpose than it does on Linux. On Linux, the `-n` option is used to treat the destination path as normal file if it is a symbolic link to a directory, which is the default behavior of the AIX `ln` command.
2 parents 96f29dd + ab2ee7a commit d870f8e

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)