From: Pedro Alves <pedro@palves.net>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Avoid running one Rust test against older LLVM
Date: Mon, 14 Sep 2020 11:49:45 +0100 [thread overview]
Message-ID: <06300f83-4e04-efce-c9d8-5ed0cfbe2e89@palves.net> (raw)
In-Reply-To: <20200910184202.2391655-1-tromey@adacore.com>
On 9/10/20 7:42 PM, Tom Tromey wrote:
> +# Return the version of LLVM used by the Rust compiler. Note that
> +# older versions of rustc don't print this -- in this case the
> +# returned version is "0.0".
> +gdb_caching_proc rust_llvm_version {
> + set rustc [find_rustc]
> + set output [lindex [remote_exec host "$rustc --version --verbose"] 1]
Pedantically I think it would be better to avoid executing
" --version --verbose" when find_rustc returns "".
Pedro Alves
> + foreach line [split $output \n] {
> + if {[regexp "LLVM version: (.+)\$" $output ignore version]} {
> + return $version
> + }
> + }
> + verbose "could not match rustc version output: $output"
> + return 0.0
> +}
next prev parent reply other threads:[~2020-09-14 10:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 18:42 Tom Tromey
2020-09-14 7:58 ` Tom de Vries
2020-09-14 10:49 ` Pedro Alves [this message]
2020-09-15 15:22 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06300f83-4e04-efce-c9d8-5ed0cfbe2e89@palves.net \
--to=pedro@palves.net \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).