From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CCFAF3858416; Thu, 2 May 2024 10:42:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCFAF3858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714646576; bh=3k3NSMLywmb5JW7hjajXifqGNEY5DYDgLMnDvFE+C8Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dMj6eAKHUqUNbqQB5zn8i5oIwPajUYeEfHvwgVLWK+S5GB9hQZERGnO2eYLpyGgs2 e9LYzKXroi5V4xi2YtqWMVH6yg1xQYENpjZtil8nTx9kZg/+7LY6T97f2p26rWkO28 duzL1pGoDT0x1riI17ZpATZhMa/5TJlRX11+k4qE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/110710] LTO linker on Windows creates an invalid Makefile Date: Thu, 02 May 2024 10:42:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: peter0x44 at disroot dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110710 --- Comment #15 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:985b5a90f70c7376c771317c6c8c3bc5ef05e227 commit r15-107-g985b5a90f70c7376c771317c6c8c3bc5ef05e227 Author: Peter Damianov Date: Sun Apr 28 16:16:11 2024 -0700 Driver: Add new -truncate option This commit adds a new option to the driver that truncates one file aft= er linking. Tested likeso: $ gcc hello.c -c $ du -h hello.o 4.0K hello.o $ gcc hello.o -truncate hello.o $ ./a.out Hello world $ du -h hello.o $ 0 hello.o $ gcc hello.o -truncate gcc: error: missing filename after '-truncate' The motivation for adding this is PR110710. It is used by lto-wrapper to truncate files in a shell-independent manner. Signed-off-by: Peter Damianov PR lto/110710 * common.opt (truncate): New internal option. * gcc.cc (totruncate_file): New global. (driver_handle_option): Handle -truncate . (driver::final_actions): Truncate the file indicated.=