From patchwork Thu Aug 1 14:56:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1967724 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=U9GIs21q; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WZXKb1QXdz1yZv for ; Fri, 2 Aug 2024 01:03:47 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 74153385EC54 for ; Thu, 1 Aug 2024 15:03:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id AAEF6385C6C7 for ; Thu, 1 Aug 2024 14:58:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AAEF6385C6C7 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AAEF6385C6C7 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::52d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524320; cv=none; b=rzcWEOnXGtZ4Y9kisObufx2YsP8iRPUNhn2zI9nEt91YOLc3Ct8SeDZMlV10kqwoxRl9r09dW+92Z5wkhjPKMK8aHAQtXXHnRNVytekKk8FK6zCXRIy2hQUdK5gDe57076lIZ6gJoWsvvKVxwqJbuGpOYaiTPFBMlPKWSdzEnEw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524320; c=relaxed/simple; bh=jCOt34WbJv+t1YQ5PFLdQbOBnh+IdMCL7vL2+FGXEDc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=m2f96Fp0iGs3W+o0TfJCEwl7R5A/hndRHMZA8/6NNtNNXSRkop68UJBIg2/KMHhk81tN51g6JssQ4+lKpxhaQq/+0UF5zXrBU1hkGl8TN9kUfkwNL4kG5TGDRGuSoFz0a+Wh6/cjF4VCbOuooKR+lsMJyyrMFgLSE8Ou5UlcCck= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5b3fff87e6bso4447764a12.0 for ; Thu, 01 Aug 2024 07:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1722524317; x=1723129117; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ivha7CZ7KJSJ3EhYrJkkNoCKU9lFGRAG+ejpSWHT/pM=; b=U9GIs21qtsboGl/mMDr8/clkoQmleE7LTjuHVXZwpnkACzdXK7RAdTGRQAz0rfoWJi yT6rx3pvCPa1RK3s40FUmZCFZHMGmolP0jGR1DzNVsgTmrIAafa+tKAy3k+P1EcwokSW d+pOT7UZjLw9oliiLLQEy7dl7ROOYZAMhVP1fP/atPrICSfjFUvQa0HG2/8Fz4uJFBwZ MLYqJngZEC5BhVkf+XwhdSp1yRWpVBIQgk40/IT5net9WcB8GOfYFMYCgDXdlxh+bZc8 XPe52toIHEvhaWoneC7mLt94+nr1n9ueVsA+dZcAIf5x1F15s0/AM7R8YL3yXZixkdxU VpvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722524317; x=1723129117; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ivha7CZ7KJSJ3EhYrJkkNoCKU9lFGRAG+ejpSWHT/pM=; b=uyJoGWSCzXLZfVpsbHB4wOVY2VQlROqeU17QvAcXEm4076IBbuvX/JSyadRjKYjRZA ykVjdC672uozKbkWWFkq5Z3EGtNf6HLZ2MCBfrJ1FRXh9EncD69R3zgj/EpqW0ECUi3W p/rlKTyDRS01yae8KL2Uk38pmsd+d9Vx2CRjZ8nZYgkMvHOoy0lzaEibqmAEMqZF+zr3 e6D1UJkOT92QEuuP0nescozVntFljAPEWbWp7pfHz/Yy+vySlQHyPbf8RbYNePktyPTM Wkk8DGZpcVCvYDIdiaMySjdnmwfyn1KS9oHtYFWsxirfcpNy/2yq8+5Ow7PgfA244b46 KyMw== X-Gm-Message-State: AOJu0YzYlApBMAb7ElMAn23QYIjk70RUMJGj0GgiouyhgdTz2eUCkAmr O/MYiBpNPJe3rLUY5495NrFPWovKfubCuoklsh0QecLtICjZdc82XlACOZloK5EVK+Tpy9LX0wE WqyHG X-Google-Smtp-Source: AGHT+IEjw7aBWQwm10JTV9I3Np8iqk3qrA/H3BjncnJtmuV4+TJ90LOuTv0ISyqX8KP3Q5wD1NPD0Q== X-Received: by 2002:a05:6402:1a3c:b0:5a3:5ac1:ed57 with SMTP id 4fb4d7f45d1cf-5b7f36f5898mr477935a12.5.1722524317090; Thu, 01 Aug 2024 07:58:37 -0700 (PDT) Received: from platypus.lan ([2a04:cec2:9:dc84:3622:6733:ff49:ee91]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac63590592sm10252456a12.25.2024.08.01.07.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 07:58:36 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Thomas Schwinge Subject: [PATCH 009/125] Rust: Move 'libformat_parser' build into the GCC build directory Date: Thu, 1 Aug 2024 16:56:05 +0200 Message-ID: <20240801145809.366388-11-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240801145809.366388-2-arthur.cohen@embecosm.com> References: <20240801145809.366388-2-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org From: Thomas Schwinge Fixes #2883. gcc/rust/ChangeLog: * Make-lang.in (LIBFORMAT_PARSER): Point to the GCC build directory. * ($(LIBFORMAT_PARSER)): Build in the GCC build directory. --- gcc/rust/Make-lang.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in index 497a3c76166..b3301f5ce6f 100644 --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -212,7 +212,8 @@ RUST_ALL_OBJS = $(GRS_OBJS) $(RUST_TARGET_OBJS) rust_OBJS = $(RUST_ALL_OBJS) rust/rustspec.o LIBPROC_MACRO_INTERNAL = ../libgrust/libproc_macro_internal/libproc_macro_internal.a -LIBFORMAT_PARSER = $(srcdir)/../libgrust/libformat_parser/target/debug/liblibformat_parser.a +LIBFORMAT_PARSER_D = rust/libformat_parser +LIBFORMAT_PARSER = $(LIBFORMAT_PARSER_D)/debug/liblibformat_parser.a RUST_LIBDEPS = $(LIBDEPS) $(LIBPROC_MACRO_INTERNAL) $(LIBFORMAT_PARSER) @@ -416,7 +417,13 @@ rust/%.o: rust/lex/%.cc # TODO: Improve `cargo` invocation with host specific flags, possibly creating a $(CARGO) variable? $(LIBFORMAT_PARSER): $(srcdir)/../libgrust/libformat_parser/Cargo.toml $(wildcard $(srcdir)/../libgrust/libformat_parser/src/*.rs) - cd $(srcdir)/../libgrust/libformat_parser && cargo build --offline # FIXME: Not always release, right? + cargo \ + --config $(srcdir)/../libgrust/libformat_parser/.cargo/config \ + build \ + --offline \ + --target-dir $(LIBFORMAT_PARSER_D) \ + --manifest-path $(srcdir)/../libgrust/libformat_parser/Cargo.toml \ + # FIXME: Not always '--release', right? # build all rust/parse files in rust folder, add cross-folder includes rust/%.o: rust/parse/%.cc