From e326e1ad18acf4ae598b02228232bfd76e3a7fa6 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Sat, 15 Jul 2023 11:07:26 +0800 Subject: Fix rpath for libdir is specified Signed-off-by: WANG Rui --- src/bootstrap/builder.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 535a005c396..c6f88598b56 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1644,6 +1644,7 @@ impl<'a> Builder<'a> { // fun to pass a flag to a tool to pass a flag to pass a flag to a tool // to change a flag in a binary? if self.config.rpath_enabled(target) && util::use_host_linker(target) { + let libdir = self.sysroot_libdir_relative(compiler).to_str().unwrap(); let rpath = if target.contains("apple") { // Note that we need to take one extra step on macOS to also pass // `-Wl,-instal_name,@rpath/...` to get things to work right. To @@ -1651,10 +1652,10 @@ impl<'a> Builder<'a> { // so. Note that this is definitely a hack, and we should likely // flesh out rpath support more fully in the future. rustflags.arg("-Zosx-rpath-install-name"); - Some("-Wl,-rpath,@loader_path/../lib") + Some(format!("-Wl,-rpath,@loader_path/../{}", libdir)) } else if !target.contains("windows") && !target.contains("aix") { rustflags.arg("-Clink-args=-Wl,-z,origin"); - Some("-Wl,-rpath,$ORIGIN/../lib") + Some(format!("-Wl,-rpath,$ORIGIN/../{}", libdir)) } else { None }; -- cgit 1.4.1-3-g733a5 From 8e8c5c9f7e5ca030e5d7eb04952ea4a78fb8c352 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 19 Jul 2023 14:27:52 +0200 Subject: Improve htmldocck error a bit by providing line where error occurred --- src/etc/htmldocck.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py index 5ab1874e9ed..2e0f832192f 100755 --- a/src/etc/htmldocck.py +++ b/src/etc/htmldocck.py @@ -274,6 +274,8 @@ def get_commands(template): args = shlex.split(args) except UnicodeEncodeError: args = [arg.decode('utf-8') for arg in shlex.split(args.encode('utf-8'))] + except Exception as exc: + raise Exception("line {}: {}".format(lineno + 1, exc)) from None yield Command(negated=negated, cmd=cmd, args=args, lineno=lineno+1, context=line) -- cgit 1.4.1-3-g733a5