From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 10E673858430 for ; Thu, 1 Aug 2024 14:58:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10E673858430 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 10E673858430 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::129 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524312; cv=none; b=l/yx3Y0rElB0n12FPO1z+ALhFp4ssCtiTye4r3E5/YQdlO193RwfNVAT2jZRobN1xr523EQNj4e3BulOYrMHFRj5vZhGXX/BWFILJg9/dBfb2JTkGbASvz2U4Ik2s9XWD98ndkdRq9B1ihJDEPSg0fdO7eYVrJ0UTZV2vRij8DU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722524312; c=relaxed/simple; bh=M+z8QM25PdqQ/ovT8Ob1N3aOITHGdbHXDapg5M1+k3E=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jwAgQe+0aFZXsm8NzzJsqTVsysMcWIGyXgH8EKMwe5EsYqPrrikY4J6Dv+Qzydaz9CIsDK5Ay2Zm2WVE+4QHqP+BoalUYbygutiAZZeqDPG0jx7mfQTiHhzMibQ0ovLHruHwK6VeQimUMGocl3069clnLWrRmVt/hM10ssAI23k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-52fc4388a64so11843214e87.1 for ; Thu, 01 Aug 2024 07:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1722524308; x=1723129108; 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=gVzxvD0x5goJufLLepoKh7kvEeUHeZ6g7w9QSzHFkaY=; b=JVtnGgixr/1cTn9NVrj0fJq0Ob39rlobdcjemIgaZIKFQAjUq+1CqRgPs6ulaKN4W2 G9CS3pic9lQ0awQHR31p2HU1Chr9XUIrLDx7vr5N2W9xZFyLAF7oviT7gP/D38+1BnNb y697JfD0lTbl0Mf8h/IgKxbiKprth0rmVFUAUpCFt6M3DkfolY31XAE6w0vqx8p51BL2 fr8ThAAc9S7+hVXSjRJXVIKGmgPqh2e26REnD8zgTX5pP7tzqdq96v/wuNlNA3uuHBM8 umQjRZoTkFJbwLe/6zcDWt6fSGnO4lsRtuAI/gAWwyU3O0mUMglUlu5wYiyh+/+bk/KC PgBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722524308; x=1723129108; 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=gVzxvD0x5goJufLLepoKh7kvEeUHeZ6g7w9QSzHFkaY=; b=i0bvZ02jsi2YUwYCa8M6JZyIi5ZIb9J6QNztRs1l4RWgK8zu8zPdQ9a/ozQM3ADBQ8 gIlfv+drSKNygLI3lk+MDP2dg/ZNj+/tRrvprAOVaGLzL+K5AHJ4UJRGxpo9pKNHNqhb T6rrBJRxsSVIufoWMFfRAgBn8JZlfyo7JNLghuF46eMdzJbvpi/5qK53eQ4VrDGElM3q 6qVuUiTtHG3gbF8iUW3wsuOezj7dl4dtLNLB/dq2++PGs7wP3hSAlFKERPfYakoA1euO vq+3yr4gCOLQ5GzYRrhtAkbmr6y5pUTbeXC3DanUC9GvsOoTWhcHChEaPpovfyL82JMb cu/A== X-Gm-Message-State: AOJu0YxoZ/oi7iOM/9vkdfgOWJtr6lSW4EMAqZpnzNyQ5b9/QfaqQkQj rhuQVYI5KRaBkmS95Tstn9msxofNLyUFm3xVWDwwCdASvxHtssdUlkmPe+IhcK6tdCQk5gTIy+r 79HyY X-Google-Smtp-Source: AGHT+IG2d7xCmeqG6txiUUtheyXqQdwOpJTCap+iHodfByV9BfidWTuiWRJVSdLHaIO1bqckdzS7WA== X-Received: by 2002:a05:6512:3e2a:b0:530:aea2:2454 with SMTP id 2adb3069b0e04-530bb36be45mr141537e87.7.1722524307945; Thu, 01 Aug 2024 07:58:27 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Aug 2024 07:58:27 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Thomas Schwinge Subject: [PATCH 006/125] gccrs: Add 'gcc/rust/Make-lang.in:LIBFORMAT_PARSER' Date: Thu, 1 Aug 2024 16:56:02 +0200 Message-ID: <20240801145809.366388-8-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.9 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 List-Id: From: Thomas Schwinge ... to avoid verbatim repetition. gcc/rust/ * Make-lang.in (LIBPROC_MACRO_INTERNAL): New. (RUST_LIBDEPS, crab1$(exeext), rust/libformat_parser.a): Use it. --- gcc/rust/Make-lang.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in index 8ac0d1d1973..bcf424e6c18 100644 --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -212,6 +212,9 @@ 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 = rust/libformat_parser.a + +RUST_LIBDEPS = $(LIBDEPS) $(LIBPROC_MACRO_INTERNAL) $(LIBFORMAT_PARSER) RUST_LIBDEPS = $(LIBDEPS) $(LIBPROC_MACRO_INTERNAL) @@ -220,7 +223,7 @@ RUST_LIBDEPS = $(LIBDEPS) $(LIBPROC_MACRO_INTERNAL) crab1$(exeext): $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(RUST_LIBDEPS) $(rust.prev) @$(call LINK_PROGRESS,$(INDEX.rust),start) +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ - $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBS) $(LIBPROC_MACRO_INTERNAL) rust/libformat_parser.a $(BACKENDLIBS) + $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBS) $(LIBPROC_MACRO_INTERNAL) $(LIBFORMAT_PARSER) $(BACKENDLIBS) @$(call LINK_PROGRESS,$(INDEX.rust),end) # Build hooks. @@ -411,9 +414,10 @@ rust/%.o: rust/lex/%.cc %.toml: echo $@ -rust/libformat_parser.a: $(srcdir)/../libgrust/libformat_parser/Cargo.toml $(wildcard $(srcdir)/../libgrust/libformat_parser/src/*.rs) - cargo build --manifest-path $(srcdir)/../libgrust/libformat_parser/Cargo.toml --release # FIXME: Not always release, right? - cp $(srcdir)/../libgrust/libformat_parser/target/release/liblibformat_parser.a $@ +# 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? + cp $(srcdir)/../libgrust/libformat_parser/target/debug/liblibformat_parser.a $@ # build all rust/parse files in rust folder, add cross-folder includes rust/%.o: rust/parse/%.cc -- 2.45.2