From patchwork Fri Dec 16 17:01:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 34031 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp1082027wrn; Fri, 16 Dec 2022 09:02:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf6F1BwGIBxisCtOlRSgSt3HTlGA3PMmLlURpVYTIDOrzy8IN4VYl9NxYG5jo3HMz2mAcrRE X-Received: by 2002:a05:6402:2026:b0:46d:6af2:44b5 with SMTP id ay6-20020a056402202600b0046d6af244b5mr29980056edb.39.1671210140535; Fri, 16 Dec 2022 09:02:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671210140; cv=none; d=google.com; s=arc-20160816; b=YFc47do89cDzFCbpi3F6xf2EyZ0SuaYMxLC/JDtxgoTQvxwVTSP8jE9Z2EuI2ZXHwd 2oloGbXDOMUs3QVcjn7vSIMQtWXCfTjWPvYs18oS+fJMhil9neqgxVc5c7UTpWqBXJQp 043m4ivV9ySolo5b0ViUQfSrMYshIRyfGYEpGPUsTGpkZvSGSiXDtErbp3YknVazSXLV r0R6hHShwXs5Z6cD/ngO57WEjdjj/rZ/KK5v4VNOfotGGtS6IDa8lpbQAMx+iA1UUOav vyBQvVC2nr96Zy5xiFcfR00vUFviGHQ6dBE/gXKJ/v+p7njd5Af3QhIG3i8XRqjNTIJQ MFRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=rdmmy1E+kii3/ZS7lWhuNNXRuIimk3M5x7GQXjXxYq8=; b=xIDxibPoFQ6R/pOMr2NV65BWEBs+ObffkV6TGlWUm8HKmNZwG0RCIzHn+C0xL0dLUg TBOYhHwHlG2uXdsO2WeDg0XOzT4M5YZa9iRedbx6EtrxsZ5A40sdkKxDdfk7HXawcczG idEBqCHtqO1NudgrrX7aIxQUpwOiP07VwjPTfzdsc7JaISpc8u6cK+AkFaTOloXo9sds z9Tdwee2BoghMM0mwCR4SbiYRNtYWoleNEkec/q7VcXIc4D8ujfvxPTba+yicRiFN9nk 1HLvFIYiIRUm8DjWf3TZIINCaX5BtfpfdbUTHiL+ObxlEKpbjJQs1cIsk7Lv3CmOqaEN o2Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=OSx3CmN3; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id u16-20020a056402065000b0046b5f80f128si2580149edx.193.2022.12.16.09.02.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 09:02:20 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=OSx3CmN3; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 74FD63838F2C for ; Fri, 16 Dec 2022 17:02:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74FD63838F2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671210139; bh=rdmmy1E+kii3/ZS7lWhuNNXRuIimk3M5x7GQXjXxYq8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=OSx3CmN3IG6Ahs3T1a3kbhqKiVhc4eE75RI72suHr6w0GVmO4KHnfsWGq4yNYJbEY LcT9zOd6uRci4TlCCip1OaizlNsO91IqXQWRzKbleo8CibZRlBiH2BxC1F47J5LgBX HDg/OlHI7OMmRmKUSpTpApkAhNRW3nB8AUP42L5A= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 5E467383F20A for ; Fri, 16 Dec 2022 17:01:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5E467383F20A Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-356-TkutGuNUP-e2MrY1esCqJA-1; Fri, 16 Dec 2022 12:01:33 -0500 X-MC-Unique: TkutGuNUP-e2MrY1esCqJA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 288C7101A521; Fri, 16 Dec 2022 17:01:33 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.2.17.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEBEA14171BE; Fri, 16 Dec 2022 17:01:32 +0000 (UTC) To: gcc-patches@gcc.gnu.org, Arthur Cohen Cc: David Malcolm Subject: [PATCH] gccrs: add selftest-rust-gdb and selftest-rust-valgrind "make" targets Date: Fri, 16 Dec 2022 12:01:18 -0500 Message-Id: <20221216170118.457649-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: David Malcolm via Gcc-patches From: David Malcolm Reply-To: David Malcolm Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752390844404914249?= X-GMAIL-MSGID: =?utf-8?q?1752390844404914249?= Add "make" targets to make it easy to run the rust selftests under gdb and under valgrind via: make selftest-rust-gdb and make selftest-rust-valgrind respectively, similar to analogous "make" targets in the C and C++ frontends. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/rust/ChangeLog: * Make-lang.in (selftest-rust-gdb): New. (selftest-rust-valgrind): New. Signed-off-by: David Malcolm --- gcc/rust/Make-lang.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in index 681ac7b3fee..76015b3426b 100644 --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -275,6 +275,18 @@ s-selftest-rust: $(RUST_SELFTEST_DEPS) $(GCC_FOR_TARGET) $(RUST_SELFTEST_FLAGS) $(STAMP) $@ +# Convenience methods for running rust selftests under gdb: +.PHONY: selftest-rust-gdb +selftest-rust-gdb: $(RUST_SELFTEST_DEPS) + $(GCC_FOR_TARGET) $(RUST_SELFTEST_FLAGS) \ + -wrapper gdb,--args + +# Convenience methods for running rust selftests under valgrind: +.PHONY: selftest-rust-valgrind +selftest-rust-valgrind: $(RUST_SELFTEST_DEPS) + $(GCC_FOR_TARGET) $(RUST_SELFTEST_FLAGS) \ + -wrapper valgrind,--leak-check=full + # Install info documentation for the front end, if it is present in the source directory. This target # should have dependencies on info files that should be installed. rust.install-info: