From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B93F1B282; Mon, 18 Dec 2023 12:07:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LKUJGxHT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89C75C433CA; Mon, 18 Dec 2023 12:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702901221; bh=DrUER6FrPw2fjC9H9x1urksXUY0gGNG6zMiTe1yGdnU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LKUJGxHTrZ1gQyvq878M4w4HTVQcb8bbMxwpc19jT0HKCWZyr7ueaR6K9Nmol7qf4 oYBbD8AzPcLS+DHc2TbrwtzMr178ov8zgr2I7Jxfv58m6bGFAVjUojoZJ9MlcEH2Dj qi69pp+NDQ/8Kav3JL/aUwfcOOOz+27WnDiUwk9SFR/pN6VrS1qJQT6FeRATOupFX9 8POziYZNVql6QVwrqMz0KFFD2lfeRP9FfvzHXTgMaeG5ZlwI17Ags7DaTZSvs9zYnI 9k0lKnHMvyELpUrEMLhHVNbbFTOHJrH01NGe0EUJPgM5MPGsVQQOA8BIlY7WjLg55H NlcR6Bf/3H/bA== Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-1fab887fab8so2526310fac.0; Mon, 18 Dec 2023 04:07:01 -0800 (PST) X-Gm-Message-State: AOJu0YyFW6kC53iyOVWpp9ERjqzpi3NmNbENdme5lRRL3i35ULj+PzqF xvFdGbpwCvG3BQ3bo0lmsObtaxFGlGUMs9o6Hjg= X-Google-Smtp-Source: AGHT+IHbXzdWjN3WLIrbJWsVdm5g8DLYEIA4IOfNJwqDUwnzQPJ+UKUh+M42CGcq0eJeYmSUPySQg3zPBGdpCR1G9Xc= X-Received: by 2002:a05:6870:6b90:b0:203:7e47:3efe with SMTP id ms16-20020a0568706b9000b002037e473efemr7533561oab.64.1702901220899; Mon, 18 Dec 2023 04:07:00 -0800 (PST) Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1c03eb18-a6ac-45c8-8fea-46097bb4e132@gmail.com> <20231215064823.ltm55fk4zclsuuwq@vireshk-i7> <20231215112418.usky65sibhbiubyx@vireshk-i7> In-Reply-To: From: Masahiro Yamada Date: Mon, 18 Dec 2023 21:06:22 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V2] docs: rust: Clarify that 'rustup override' applies to build directory To: Miguel Ojeda Cc: Viresh Kumar , Tiago Lam , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Jonathan Corbet , Vincent Guittot , rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 15, 2023 at 8:53=E2=80=AFPM Miguel Ojeda wrote: > > On Fri, Dec 15, 2023 at 12:24=E2=80=AFPM Viresh Kumar wrote: > > > > I thought people aren't required to enter the build directory now (but > > just source code directory) and simply do: > > > > make LLVM=3D1 O=3D rustupoverride > > Yeah, that is correct, but we don't need to write the `O=3D` in the > commands themselves. The idea is that 1) the commands can be easily > copy-pasted, 2) commands look simple (i.e. there are many other > variations and options you may pass), 3) newcomers do not need to care > about `O=3D` (so it is extra simple for them). > > > Will this still work if we are in the build directory ? > > Both should work (as long as the initial setup in the build folder is > done, of course), so I think we can simply remove the mention about > "enter ..." now and simply give the command. > > In fact, even if Kbuild did not support that, we could still remove > the "enter ...", because then the `make` would need to be run like any > other target from the source tree. FWIW. Kbuild is designed to be able to initiate 'make' from anywhere, even if the build directory is not set up. In that case, you need to use -f option to point to the top Makefile. You can enter a build directory, then do this: $ make -f /Makefile defconfig all Likewise, both of the following should work. 1) Enter the source directory, and $ make O=3D rustupoverride 2) Enter the build directory, and $ make -f /Makefile rustupoverride > In other words, regardless of the > answer, we could remove it thanks to the new target, unless I am > missing something. > > Cheers, > Miguel > -- Best Regards Masahiro Yamada