Compactly override a build script for all targets
NickName:kpozin Ask DateTime:2019-03-04T06:51:43

Compactly override a build script for all targets

Expanding on an earlier question about overriding build scripts with custom libraries...

I have multiple build targets, and might have more in the future:

.cargo/config:

[target.x86_64-unknown-linux-gnu.libfoo]
rustc-link-lib = ["libfoo"]

[target.x86_64-apple-darwin.libfoo]
rustc-link-lib = ["libfoo"]

# ...

Say I am overriding the library "libfoo" with the same prebuilt library for all targets. How would I avoid having to list out [target.<machine-vendor-os>.libfoo] tables for all current and future targets? Is there a cfg(...) expression that would achieve this?

Copyright Notice:Content Author:「kpozin」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54974605/compactly-override-a-build-script-for-all-targets

More about “Compactly override a build script for all targets” related questions

Compactly override a build script for all targets

Expanding on an earlier question about overriding build scripts with custom libraries... I have multiple build targets, and might have more in the future: .cargo/config: [target.x86_64-unknown-l...

Show Detail

FAKE: Target prints all available targets in build script

Question: Is there a command in FAKE available which prints all the defined targets in the build script? I want to setup my FAKE build in such a way that it prints a list of all available targets...

Show Detail

Override One Property in a .targets file

Background: I have several solutions with roughly 300 C++ projects across them, most of them shared. We are using Visual Studio 2013 and have a build script that compiles all of the projects in the

Show Detail

Re-use Xcode custom script build rules between targets

I have a large Xcode project with lots of targets (130+ and growing), and each of these targets needs several custom script build rules. These build rules are however all identical between the tar...

Show Detail

list all bazel targets in the directory

How can I put all targets from a package into one variable in a higher-level package? I'm trying to create a simulation framework with the following architecture: . ├── run_simulation.py ├──da

Show Detail

.NET Core - override default build targets

I have an angular project that I'd like to include in my Visual Studio solution. I added a new project with type ASP.NET Core 2/Empty that has all of the files, excluding the node_modules and similar

Show Detail

Implicit List of All Build Targets in SCONS?

I have an scons project that force includes several header files as a compiler flag. # Forced include files passed directly to the compiler env.Append(CCFLAGS = ['/FIinclude.h']) These files are...

Show Detail

Build all targets specified in the Dockerfile?

Let's say I have a Dockerfile like this: FROM &lt;some image&gt; as base COPY src /src RUN &lt;build command&gt; FROM base as test RUN &lt;test command&gt; FROM base as lint RUN &

Show Detail

Is there a way to list all the build targets available in a build file?

Given a build file (.csproj or msbuild.xml or whatever), I'd like to run a msbuild command that lists all the available, defined targets. Does that function exist? I know I could do an Xpath s...

Show Detail

Is there a quick way to build all targets in Qt Creator?

I have a large CMake project in Qt Creator with hundreds of targets. To build all of them at once (which is something I only need to do once in a while) the best way I know is to go to Projects, Bu...

Show Detail