Reputation: 115
I want to use a variable copt
argument to build a specific target. so I use the --copt
of bazel build
command line.
However bazel will rebuild all dependencies of the target when the copt
changed. these is not needed.
Is there some better way to deal with the situation?
Thanks a lot.
Upvotes: 1
Views: 1548
Reputation: 20580
With --per_file_copt
, you can finely control the compiler options for particular files from the command line.
Upvotes: 2