DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 589HPhl83582777 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 589HPhl83582777 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=J/K5FDxI X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25CF93858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1757438742; bh=q+GU30oG/MR6P5xAPRk2Eel5uc58awLHRa473VzLaIs=; h=Date:To:cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=J/K5FDxI0zQFjJG29fOCe+CO/JvnoX3bBOsRWLrHBVZiN+O/D6a9xgdJDyLN8kV/u BngK/NBMXr/4LjLnDiBx+yo5/pzVHdmVXL/+uazBKG7DyvNNBFr5VnqoIBy+/XPcmU DYC/gERD9sJhg9rwv7JVCulNT+4Wmc4ahXumUc+w= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6FDC03858294 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6FDC03858294 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757438712; cv=none; b=w6vOjdwwqaJt4L92lrDgoq8jfeXBoibOQz3wUJEWgF9yv8rY0514+vtE3Cyhw45a88Z0Ker5icjoUSxLDhJYiB3VJglCP3ZwVyz5JAfVZ4xfTqJ5pldPgoXkjs+oDXSpALy9yxzZ3R20J5sNFneE5dO5K4uDqPm88uR70oqMMK4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1757438712; c=relaxed/simple; bh=zO86eoFnbzCOg1xOcz+x1/lEidlN7B1ieE5rslWOI5s=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=EOa7Beq1ewGZMQuDNqxiW5QJxZ7rMRWe4uMi9ZwvvvAhCSFX/ZzqZB8cw8Lx7UCRKy0ypk3fWCqW+OGdAOHKaXLqaXUdc39pa7YgKQz4gxM15vGLjI6EQ7/gKSvsM9+JlT+X94bLvejfcOFTjtI7WWJfEj4idPmAYZe6tkuGACE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FDC03858294 Date: Tue, 9 Sep 2025 10:25:11 -0700 (PDT) X-X-Sender: jeremyd AT resin DOT csoft DOT net To: Mark Liam Brown cc: cygwin AT cygwin DOT com Subject: Re: Building Windows/ARM64 binaries with Cygwin clang? In-Reply-To: Message-ID: <588303a2-f41f-0ad3-54b0-4b2ae0b1e0e4@jdrake.com> References: MIME-Version: 1.0 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jeremy Drake via Cygwin Reply-To: Jeremy Drake Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Tue, 9 Sep 2025, Mark Liam Brown via Cygwin wrote: > Greetings! > > Can Cygwin 3.7 clang generate Windows/ARM64 binaries somehow? > > My attempts so far are a failure: > clang -target aarch64-pc-windows-gnu -std=gnu17 -Wall -g grapetest1.c > -lntdll -o grapetest1.x86_64.exe > grapetest1.c:34:10: fatal error: 'windows.h' file not found > 34 | #include > | ^~~~~~~~~~~ > 1 error generated. > Yes, but you need a sysroot. I have tested the scripts at https://github.com/mstorsjo/llvm-mingw you can use "LLVM_VERSION=llvmorg-20.1.8 ./build-all.sh --host-clang /opt/llvm-mingw" (or wherever you want things installed) and it will make sysroots and cross toolchain links for i686/x86_64/armv7/aarch64 in there. You may need to set the llvm version via environment variable "LLVM_VERSION=llvmorg-20.1.8", I think it defaults to 21.1.0 now. You will need llvm, clang and lld, plus normal host development tools (make, cmake, ninja, etc). -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple