কমান্ড-লাইন রেফারেন্স

bazel [<startup options>] <command> [<args>]
বা
bazel [<startup options>] <command> [<args>] -- [<target patterns>]
লক্ষ্য প্যাটার্ন সিনট্যাক্সের জন্য ব্যবহারকারীর নির্দেশিকা দেখুন।

বিকল্প সিনট্যাক্স

বিকল্প বিভিন্ন উপায়ে Bazel পাস করা যেতে পারে. যে বিকল্পগুলির জন্য একটি মান প্রয়োজন সেগুলি হয় একটি সমান চিহ্ন বা একটি স্থান দিয়ে পাস করা যেতে পারে:

--<option>=<value>
--<option> <value>
কিছু বিকল্পের একটি একক অক্ষর সংক্ষিপ্ত আকার রয়েছে; সেক্ষেত্রে শর্ট ফর্মটিকে একটি ড্যাশ এবং একটি স্পেস দিয়ে পাস করতে হবে।
-<short_form> <value>

বুলিয়ান বিকল্পগুলি নিম্নরূপ সক্রিয় করা যেতে পারে:

--<option>
--<option>=[true|yes|1]
এবং নিম্নরূপ নিষ্ক্রিয়:
--no<option>
--<option>=[false|no|0]

ট্রিস্টেট বিকল্পগুলি সাধারণত ডিফল্টরূপে স্বয়ংক্রিয়ভাবে সেট করা হয়, এবং নিম্নরূপ জোর করে-সক্ষম করা যেতে পারে:

--<option>=[true|yes|1]
বা force-disabled নিম্নরূপ:
--no<option>
--<option>=[false|no|0]

কমান্ড

analyze-profile বিল্ড প্রোফাইল ডেটা বিশ্লেষণ করে।
aquery প্রদত্ত লক্ষ্যগুলি বিশ্লেষণ করে এবং কর্ম গ্রাফটি জিজ্ঞাসা করে।
build নির্দিষ্ট লক্ষ্যগুলি তৈরি করে।
canonicalize-flags বেজেল বিকল্পগুলির একটি তালিকা ক্যানোনিকালাইজ করে।
clean আউটপুট ফাইল মুছে ফেলে এবং ঐচ্ছিকভাবে সার্ভার বন্ধ করে।
coverage নির্দিষ্ট পরীক্ষার লক্ষ্যগুলির জন্য কোড কভারেজ রিপোর্ট তৈরি করে।
cquery কনফিগারেশনের সাথে নির্দিষ্ট লক্ষ্যগুলি লোড, বিশ্লেষণ এবং অনুসন্ধান করে।
dump বেজেল সার্ভার প্রক্রিয়ার অভ্যন্তরীণ অবস্থা ডাম্প করে।
fetch বাহ্যিক সংগ্রহস্থলগুলি নিয়ে আসে যা লক্ষ্যগুলির পূর্বশর্ত।
help কমান্ড বা সূচকের জন্য প্রিন্ট সাহায্য করে।
info বেজেল সার্ভার সম্পর্কে রানটাইম তথ্য প্রদর্শন করে।
license এই সফটওয়্যারের লাইসেন্স প্রিন্ট করে।
mobile-install মোবাইল ডিভাইসে লক্ষ্য ইনস্টল করে।
modquery Bzlmod বাহ্যিক নির্ভরতা গ্রাফকে প্রশ্ন করে
print_action একটি ফাইল কম্পাইল করার জন্য কমান্ড লাইন args প্রিন্ট করে।
query একটি নির্ভরতা গ্রাফ ক্যোয়ারী চালায়।
run নির্দিষ্ট লক্ষ্য রান করে।
shutdown বেজেল সার্ভার বন্ধ করে।
sync ওয়ার্কস্পেস ফাইলে নির্দিষ্ট করা সমস্ত সংগ্রহস্থল সিঙ্ক করে
test নির্দিষ্ট পরীক্ষার লক্ষ্যগুলি তৈরি করে এবং চালায়।
version Bazel জন্য সংস্করণ তথ্য মুদ্রণ.

স্টার্টআপ বিকল্প

যে বিকল্পগুলি কমান্ডের আগে উপস্থিত হয় এবং ক্লায়েন্ট দ্বারা পার্স করা হয়:
--[no]autodetect_server_javabase ডিফল্ট: "সত্য"
যখন --noautodetect_server_javabase পাস করা হয়, Bazel Bazel সার্ভার চালানোর জন্য স্থানীয় JDK-তে ফিরে আসে না এবং পরিবর্তে প্রস্থান করে।
ট্যাগ: affects_outputs , loses_incremental_state
--[no]batch ডিফল্ট: "মিথ্যা"
সেট করা হলে, ব্যাজেল স্ট্যান্ডার্ড ক্লায়েন্ট/সার্ভার মোডের পরিবর্তে সার্ভার ছাড়াই শুধুমাত্র একটি ক্লায়েন্ট প্রক্রিয়া হিসাবে চালানো হবে। এটি অবহেলিত এবং সরানো হবে, যদি আপনি দীর্ঘায়িত সার্ভারগুলি এড়াতে চান তাহলে দয়া করে সার্ভারটি স্পষ্টভাবে বন্ধ করতে পছন্দ করুন৷
ট্যাগ: loses_incremental_state , bazel_internal_configuration , deprecated
--[no]batch_cpu_scheduling ডিফল্ট: "মিথ্যা"
শুধুমাত্র লিনাক্সে; ব্লেজের জন্য 'ব্যাচ' সিপিইউ শিডিউলিং ব্যবহার করুন। এই নীতিটি কাজের চাপের জন্য উপযোগী যেগুলি অ-ইন্টারেক্টিভ, কিন্তু তাদের সুন্দর মান কমাতে চায় না। 'man 2 sched_setscheduler' দেখুন। মিথ্যা হলে, Bazel একটি সিস্টেম কল সঞ্চালন করে না।
ট্যাগ: host_machine_resource_optimizations
--bazelrc =<path> ডিফল্ট: বিবরণ দেখুন
ব্যাজেল বিকল্পের ডিফল্ট মান ধারণকারী ব্যবহারকারী .bazelrc ফাইলের অবস্থান। /dev/null নির্দেশ করে যে পরবর্তী সমস্ত `--bazelrc` উপেক্ষা করা হবে, যা ব্যবহারকারীর rc ফাইলের অনুসন্ধান নিষ্ক্রিয় করতে উপযোগী, যেমন রিলিজ বিল্ডে। এই বিকল্পটি একাধিকবার নির্দিষ্ট করা যেতে পারে। যেমন `--bazelrc=x.rc --bazelrc=y.rc --bazelrc=/dev/null --bazelrc=z.rc` সহ, 1) x.rc এবং y.rc পড়া হয়। 2) z.rc পূর্বের /dev/null এর কারণে উপেক্ষা করা হয়েছে। অনির্দিষ্ট থাকলে, Bazel প্রথম .bazelrc ফাইলটি ব্যবহার করে যা এটি নিম্নলিখিত দুটি স্থানে পাওয়া যায়: ওয়ার্কস্পেস ডিরেক্টরি, তারপর ব্যবহারকারীর হোম ডিরেক্টরি৷ দ্রষ্টব্য: কমান্ড লাইন বিকল্পগুলি সর্বদা bazelrc-এর যেকোনো বিকল্পকে ছাড়িয়ে যাবে।
ট্যাগ: changes_inputs
--[no]block_for_lock ডিফল্ট: "সত্য"
যখন --noblock_for_lock পাস করা হয়, Bazel একটি চলমান কমান্ড সম্পূর্ণ হওয়ার জন্য অপেক্ষা করে না, বরং অবিলম্বে প্রস্থান করে।
ট্যাগ: eagerness_to_exit
--[no]client_debug ডিফল্ট: "মিথ্যা"
সত্য হলে, ক্লায়েন্ট থেকে stderr-এ ডিবাগ তথ্য লগ করুন। এই বিকল্পটি পরিবর্তন করলে সার্ভার পুনরায় চালু হবে না।
ট্যাগ: bazel_monitoring , affects_outputs
--connect_timeout_secs =<an integer> ডিফল্ট: "30"
সার্ভারের সাথে সংযোগ করার প্রতিটি প্রচেষ্টার জন্য ক্লায়েন্টের অপেক্ষা করার পরিমাণ
ট্যাগ: bazel_internal_configuration
--[no]expand_configs_in_place ডিফল্ট: "true"
স্বাভাবিক rc অপশন এবং কমান্ড-লাইন নির্দিষ্ট অপশনের মধ্যে একটি নির্দিষ্ট বিন্দু সম্প্রসারণের বিপরীতে --config পতাকাগুলির সম্প্রসারণ জায়গায় করা হয়েছে।
ট্যাগ: no_op , deprecated
--failure_detail_out =<path> ডিফল্ট: বিবরণ দেখুন
যদি সেট করা থাকে, সার্ভারটি ব্যর্থতার সম্মুখীন হলে এবং স্বাভাবিক হিসাবে gRPC এর মাধ্যমে রিপোর্ট করতে না পারলে একটি ব্যর্থতা_বিস্তারিত প্রোটোবাফ বার্তা লেখার জন্য একটি অবস্থান নির্দিষ্ট করে৷ অন্যথায়, অবস্থান হবে ${OUTPUT_BASE}/failure_detail.rawproto।
ট্যাগ: affects_outputs , loses_incremental_state
--[no]home_rc ডিফল্ট: "সত্য"
$HOME/.bazelrc এ হোম bazelrc ফাইলটি সন্ধান করতে হবে কিনা
ট্যাগ: changes_inputs
--[no]idle_server_tasks ডিফল্ট: "সত্য"
সার্ভার নিষ্ক্রিয় থাকলে System.gc() চালান
ট্যাগ: loses_incremental_state , host_machine_resource_optimizations
--[no]ignore_all_rc_files ডিফল্ট: "false"
অন্যান্য rc-পরিবর্তনকারী পতাকার মান নির্বিশেষে সমস্ত rc ফাইল নিষ্ক্রিয় করে, এমনকি যদি এই পতাকাগুলি স্টার্টআপ বিকল্পগুলির তালিকায় পরে আসে।
ট্যাগ: changes_inputs
--io_nice_level ={-1,0,1,2,3,4,5,6,7} ডিফল্ট: "-1"
শুধুমাত্র লিনাক্সে; sys_ioprio_set সিস্টেম কল ব্যবহার করে সর্বোত্তম প্রচেষ্টা IO শিডিউলিংয়ের জন্য 0-7 থেকে একটি স্তর সেট করুন। 0 হল সর্বোচ্চ অগ্রাধিকার, 7 হল সর্বনিম্ন৷ প্রত্যাশিত সময়সূচী শুধুমাত্র অগ্রাধিকার 4 পর্যন্ত সম্মান করতে পারে। যদি একটি নেতিবাচক মান সেট করা হয়, তাহলে Bazel একটি সিস্টেম কল সম্পাদন করে না।
ট্যাগ: host_machine_resource_optimizations
--local_startup_timeout_secs =<an integer> ডিফল্ট: "120"
ক্লায়েন্ট সার্ভারের সাথে সংযোগ করার জন্য অপেক্ষা করার সর্বোচ্চ সময়
ট্যাগ: bazel_internal_configuration
--macos_qos_class =<a string> ডিফল্ট: "ডিফল্ট"
macOS এ চলাকালীন বেজেল সার্ভারের QoS পরিষেবা শ্রেণী সেট করে। অন্যান্য সমস্ত প্ল্যাটফর্মে এই পতাকাটির কোন প্রভাব নেই তবে rc ফাইলগুলি পরিবর্তন ছাড়াই তাদের মধ্যে ভাগ করা যায় তা নিশ্চিত করতে সমর্থিত। সম্ভাব্য মানগুলি হল: ইউজার-ইন্টারেক্টিভ, ইউজার-ইনিশিয়েটেড, ডিফল্ট, ইউটিলিটি এবং ব্যাকগ্রাউন্ড।
ট্যাগ: host_machine_resource_optimizations
--max_idle_secs =<integer> ডিফল্ট: "10800"
বিল্ড সার্ভারটি বন্ধ করার আগে অলসভাবে কত সেকেন্ড অপেক্ষা করবে। জিরো মানে সার্ভার কখনই বন্ধ হবে না। এটি শুধুমাত্র সার্ভার-স্টার্টআপে পড়া হয়, এই বিকল্পটি পরিবর্তন করলে সার্ভার পুনরায় চালু হবে না।
ট্যাগ: eagerness_to_exit করার_প্রস্থান , loses_incremental_state
--output_base =<path> ডিফল্ট: বিবরণ দেখুন
সেট করা হলে, আউটপুট অবস্থান নির্দিষ্ট করে যেখানে সমস্ত বিল্ড আউটপুট লেখা হবে। অন্যথায়, অবস্থান হবে ${OUTPUT_ROOT}/_blaze_${USER}/${MD5_OF_WORKSPACE_ROOT}। দ্রষ্টব্য: আপনি যদি এই মানের জন্য একটি থেকে পরবর্তী Bazel আহ্বানে একটি ভিন্ন বিকল্প নির্দিষ্ট করেন, তাহলে আপনি সম্ভবত একটি নতুন, অতিরিক্ত Bazel সার্ভার শুরু করবেন৷ Bazel নির্দিষ্ট আউটপুট বেস প্রতি ঠিক একটি সার্ভার শুরু করে। সাধারণত প্রতি ওয়ার্কস্পেসে একটি আউটপুট বেস থাকে - যাইহোক, এই বিকল্পের সাহায্যে আপনার প্রতি ওয়ার্কস্পেসে একাধিক আউটপুট বেস থাকতে পারে এবং এর ফলে একই মেশিনে একই ক্লায়েন্টের জন্য একাধিক বিল্ড চালানো যেতে পারে। কিভাবে একটি Bazel সার্ভার বন্ধ করতে হয় সে সম্পর্কে 'bazel help shutdown' দেখুন।
ট্যাগ: affects_outputs , loses_incremental_state
--output_user_root =<path> ডিফল্ট: বিবরণ দেখুন
ব্যবহারকারী-নির্দিষ্ট ডিরেক্টরি যার নীচে সমস্ত বিল্ড আউটপুট লেখা আছে; ডিফল্টরূপে, এটি $USER-এর একটি ফাংশন, কিন্তু একটি ধ্রুবক নির্দিষ্ট করে, বিল্ড আউটপুটগুলি সহযোগী ব্যবহারকারীদের মধ্যে ভাগ করা যেতে পারে।
ট্যাগ: affects_outputs , loses_incremental_state
--[no]preemptible পূর্বনির্ধারিত ডিফল্ট: "মিথ্যা"
সত্য হলে, অন্য কমান্ড শুরু হলে কমান্ডটি অগ্রিম করা যেতে পারে।
ট্যাগ: eagerness_to_exit
--server_jvm_out =<path> ডিফল্ট: বিবরণ দেখুন
সার্ভারের JVM এর আউটপুট লেখার অবস্থান। যদি সেট না থাকে তাহলে output_base-এ একটি অবস্থানে ডিফল্ট হয়।
ট্যাগ: affects_outputs , loses_incremental_state
--[no]shutdown_on_low_sys_mem ডিফল্ট: "false"
যদি max_idle_sec সেট করা থাকে এবং বিল্ড সার্ভারটি কিছুক্ষণের জন্য নিষ্ক্রিয় থাকে, সিস্টেমটি ফ্রি RAM-এ কম হলে সার্ভারটি বন্ধ করুন। শুধুমাত্র লিনাক্স।
ট্যাগ: eagerness_to_exit করার_প্রস্থান , loses_incremental_state
--[no]system_rc ডিফল্ট: "সত্য"
সিস্টেম-ওয়াইড bazelrc সন্ধান করতে হবে কিনা।
ট্যাগ: changes_inputs
--[no]unlimit_coredumps ডিফল্ট: "false"
সাধারণ অবস্থার অধীনে সার্ভার (JVM সহ) এবং ক্লায়েন্টের কোরডাম্পগুলিকে সম্ভব করার জন্য নরম কোরডাম্প সীমাকে হার্ড সীমাতে উন্নীত করে। এই পতাকাটি আপনার bazelrc-এ একবার আটকে দিন এবং এটির কথা ভুলে যান যাতে আপনি প্রকৃতপক্ষে তাদের ট্রিগার করে এমন একটি অবস্থার সম্মুখীন হলে আপনি coredumps পেতে পারেন।
ট্যাগ: bazel_internal_configuration
--[no]watchfs ডিফল্ট: "false"
সত্য হলে, Bazel একটি পরিবর্তনের জন্য প্রতিটি ফাইল স্ক্যান করার পরিবর্তে স্থানীয় পরিবর্তনের জন্য অপারেটিং সিস্টেমের ফাইল ওয়াচ পরিষেবা ব্যবহার করার চেষ্টা করে।
ট্যাগ: deprecated
সত্য হলে, ফাইল কপি করার পরিবর্তে উইন্ডোজে বাস্তব প্রতীকী লিঙ্ক তৈরি করা হবে। Windows বিকাশকারী মোড সক্ষম করা এবং Windows 10 সংস্করণ 1703 বা তার বেশি প্রয়োজন।
ট্যাগ: bazel_internal_configuration
--[no]workspace_rc ডিফল্ট: "সত্য"
$workspace/.bazelrc এ ওয়ার্কস্পেস bazelrc ফাইলটি সন্ধান করতে হবে কি না
ট্যাগ: changes_inputs
বিবিধ বিকল্প, অন্যথায় শ্রেণীবদ্ধ নয়।
--host_jvm_args =<jvm_arg> একাধিক ব্যবহার জমে আছে
JVM এক্সিকিউটিং ব্লেজে যাওয়ার জন্য পতাকা।
--host_jvm_debug
কিছু অতিরিক্ত JVM স্টার্টআপ ফ্ল্যাগ যোগ করার সুবিধার বিকল্প, যার ফলে JVM-কে স্টার্টআপের সময় অপেক্ষা করতে হয় যতক্ষণ না আপনি JDWP--সম্মত ডিবাগার (যেমন Eclipse) থেকে পোর্ট 5005-এ সংযোগ করেন।
এতে প্রসারিত হয়:
--host_jvm_args=-Xdebug
--host_jvm_args=-Xrunjdwp:transport=dt_socket,server=y,address=5005
--host_jvm_profile =<profiler_name> ডিফল্ট: ""
কিছু প্রোফাইলার/ডিবাগার-নির্দিষ্ট JVM স্টার্টআপ পতাকা যোগ করার সুবিধার বিকল্প। Bazel এর পরিচিত মানগুলির একটি তালিকা রয়েছে যা এটি হার্ড-কোডেড JVM স্টার্টআপ ফ্ল্যাগে ম্যাপ করে, সম্ভবত কিছু ফাইলের জন্য কিছু হার্ডকোড করা পাথ অনুসন্ধান করে।
--server_javabase =<jvm path> ডিফল্ট: ""
JVM-এর পথ ব্যাজেল নিজেই চালাতে ব্যবহৃত হয়।

সমস্ত কমান্ডের জন্য সাধারণ বিকল্প

বিল্ড এক্সিকিউশন নিয়ন্ত্রণ করে এমন বিকল্পগুলি:
--experimental_oom_more_eagerly_threshold =<an integer> ডিফল্ট: "100"
যদি এই পতাকাটি 100-এর কম মান নির্ধারণ করা হয়, তাহলে Bazel OOM করবে, যদি দুটি পূর্ণ GC-এর পরে, (পুরানো জেনার) হিপের এই শতাংশের বেশি এখনও দখল করা হয়।
ট্যাগ: host_machine_resource_optimizations
--experimental_ui_max_stdouterr_bytes =<an integer in (-1)-1073741819 range> ডিফল্ট: "1048576"
stdout/stderr ফাইলের সর্বোচ্চ আকার যা কনসোলে প্রিন্ট করা হবে। -1 কোন সীমা বোঝায়।
ট্যাগ: execution
বিকল্পগুলি যা ব্যবহারকারীকে উদ্দিষ্ট আউটপুট কনফিগার করতে দেয়, তার অস্তিত্বের বিপরীতে তার মানকে প্রভাবিত করে:
--repo_env =<a 'name=value' assignment with an optional value part> একাধিক ব্যবহার জমা হয়
শুধুমাত্র সংগ্রহস্থল নিয়মের জন্য উপলব্ধ অতিরিক্ত পরিবেশ ভেরিয়েবল নির্দিষ্ট করে। মনে রাখবেন যে রিপোজিটরি নিয়মগুলি যেভাবেই হোক সম্পূর্ণ পরিবেশ দেখতে পায়, কিন্তু এইভাবে কনফিগারেশনের তথ্য অ্যাকশন গ্রাফটিকে বাতিল না করে বিকল্পগুলির মাধ্যমে সংগ্রহস্থলগুলিতে প্রেরণ করা যেতে পারে।
ট্যাগ: action_command_lines
এই বিকল্পটি স্টারলার্ক ভাষার শব্দার্থবিদ্যা বা বিল্ড ফাইল, .bzl ফাইল বা ওয়ার্কস্পেস ফাইলগুলিতে অ্যাক্সেসযোগ্য বিল্ড APIকে প্রভাবিত করে।
--[no]experimental_action_resource_set ডিফল্ট: "সত্য"
যদি সত্যে সেট করা হয়, ctx.actions.run() এবং ctx.actions.run_shell() স্থানীয় নির্বাহের জন্য একটি resource_set প্যারামিটার গ্রহণ করে। অন্যথায় এটি মেমরি এবং 1 সিপিইউ এর জন্য 250 এমবি ডিফল্ট হবে।
ট্যাগ: execution , build_file_semantics , experimental
--[no]experimental_allow_tags_propagation ডিফল্ট: "মিথ্যা"
যদি সত্যে সেট করা হয়, ট্যাগগুলি একটি লক্ষ্য থেকে অ্যাকশনের নির্বাহের প্রয়োজনীয়তাগুলিতে প্রচারিত হবে; অন্যথায় ট্যাগ প্রচার করা হয় না। বিস্তারিত জানার জন্য https://github.com/bazelbuild/bazel/issues/8830 দেখুন।
ট্যাগ: build_file_semantics , experimental
--[no]experimental_cc_shared_library ডিফল্ট: "false"
যদি সত্যে সেট করা হয়, cc_shared_library নিয়মের জন্য প্রয়োজনীয় নিয়ম বৈশিষ্ট্য এবং Starlark API পদ্ধতিগুলি উপলব্ধ হবে
ট্যাগ: build_file_semantics , loading_and_analysis , experimental
--[no]experimental_disable_external_package ডিফল্ট: "মিথ্যা"
সত্য হিসাবে সেট করা হলে, স্বয়ংক্রিয়ভাবে তৈরি // বহিরাগত প্যাকেজ আর উপলব্ধ হবে না। Bazel এখনও 'বহিরাগত/বিল্ড' ফাইলটি পার্স করতে অক্ষম হবে, তবে নামহীন প্যাকেজ থেকে বহিরাগত/তে পৌঁছানো গ্লবগুলি কাজ করবে।
ট্যাগ: loading_and_analysis , loses_incremental_state , experimental
--[no]experimental_enable_android_migration_apis ডিফল্ট: "false"
সত্যে সেট করা হলে, Android Starlark মাইগ্রেশন সমর্থন করার জন্য প্রয়োজনীয় API গুলিকে সক্ষম করে৷
ট্যাগ: build_file_semantics
--[no]experimental_google_legacy_api ডিফল্ট: "false"
যদি সত্যে সেট করা হয়, Google উত্তরাধিকার কোড সম্পর্কিত Starlark বিল্ড API-এর বেশ কয়েকটি পরীক্ষামূলক টুকরা প্রকাশ করে।
ট্যাগ: loading_and_analysis , experimental
--[no]experimental_lazy_template_expansion ডিফল্ট: "মিথ্যা"
সত্য হিসাবে সেট করা হলে, প্রতিস্থাপন মানগুলির বিলম্বিত মূল্যায়নের জন্য ctx.actions.expand_template() একটি TemplateDict প্যারামিটার গ্রহণ করে।
ট্যাগ: execution , build_file_semantics , experimental
--[no]experimental_platforms_api ডিফল্ট: "মিথ্যা"
সত্য হিসাবে সেট করা হলে, ডিবাগিংয়ের জন্য দরকারী প্ল্যাটফর্ম-সম্পর্কিত স্টারলার্ক এপিআই সক্রিয় করে।
ট্যাগ: loading_and_analysis , experimental
--[no]experimental_repo_remote_exec ডিফল্ট: "মিথ্যা"
সত্য হিসাবে সেট করা হলে, repository_rule কিছু দূরবর্তী এক্সিকিউশন ক্ষমতা লাভ করে।
ট্যাগ: build_file_semantics , loading_and_analysis , experimental
--[no]experimental_sibling_repository_layout ডিফল্ট: "false"
সত্য হিসাবে সেট করা হলে, অ-প্রধান সংগ্রহস্থলগুলিকে এক্সিকিউশন রুটে প্রধান সংগ্রহস্থলের সিমলিংক হিসাবে রোপণ করা হয়। অর্থাৎ, সমস্ত সংগ্রহস্থল $output_base/execution_root ডিরেক্টরির সরাসরি সন্তান। এটি প্রকৃত শীর্ষ-স্তরের 'বহিরাগত' ডিরেক্টরির জন্য $output_base/execution_root/__main__/external মুক্ত করার পার্শ্ব প্রতিক্রিয়া রয়েছে।
ট্যাগ: action_command_lines , bazel_internal_configuration , loading_and_analysis , loses_incremental_state , experimental
--[no]incompatible_always_check_depset_elements ডিফল্ট: "সত্য"
সমস্ত কনস্ট্রাক্টরগুলিতে ডিপসেটে যোগ করা উপাদানগুলির বৈধতা পরীক্ষা করুন। উপাদানগুলি অবশ্যই অপরিবর্তনীয় হতে হবে, কিন্তু ঐতিহাসিকভাবে depset(direct=...) কনস্ট্রাক্টর চেক করতে ভুলে গেছে। ডিপসেট উপাদানে তালিকার পরিবর্তে টিপল ব্যবহার করুন। বিস্তারিত জানার জন্য https://github.com/bazelbuild/bazel/issues/10313 দেখুন।
ট্যাগ: build_file_semantics , incompatible_change
সত্য হলে, Bazel আর linking_context.libraries_to_link থেকে একটি তালিকা ফেরত দেয় না কিন্তু পরিবর্তে একটি depset প্রদান করে।
ট্যাগ: loading_and_analysis , incompatible_change
--[no]incompatible_disable_starlark_host_transitions ডিফল্ট: "মিথ্যা"
সত্যে সেট করা হলে, নিয়মের বৈশিষ্ট্যগুলি 'cfg = "হোস্ট"' সেট করতে পারে না। নিয়মের পরিবর্তে 'cfg = "exec"' সেট করা উচিত।
ট্যাগ: loading_and_analysis , incompatible_change
--[no]incompatible_disable_target_provider_fields ডিফল্ট: "false"
সত্য হিসাবে সেট করা থাকলে, ফিল্ড সিনট্যাক্সের মাধ্যমে 'টার্গেট' অবজেক্টে সরবরাহকারীদের অ্যাক্সেস করার ক্ষমতা অক্ষম করুন। পরিবর্তে প্রদানকারী-কী সিনট্যাক্স ব্যবহার করুন। উদাহরণস্বরূপ, একটি নিয়ম বাস্তবায়ন ফাংশন থেকে `my_info` অ্যাক্সেস করতে `ctx.attr.dep.my_info` ব্যবহার করার পরিবর্তে, `ctx.attr.dep[MyInfo]` ব্যবহার করুন। বিস্তারিত জানার জন্য https://github.com/bazelbuild/bazel/issues/9014 দেখুন।
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_disable_third_party_license_checking ডিফল্ট: "সত্য"
সত্য হলে, লাইসেন্স পরীক্ষা করার সমস্ত যুক্তি নিষ্ক্রিয় করে
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_disallow_empty_glob ডিফল্ট: "মিথ্যা"
যদি সত্যে সেট করা হয়, তাহলে glob() এর `allow_empty` আর্গুমেন্টের ডিফল্ট মান হল False।
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_disallow_legacy_javainfo ডিফল্ট: "সত্য"
অবচয়। না-ওপ.
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_disallow_struct_provider_syntax ডিফল্ট: "false"
সত্যে সেট করা হলে, নিয়ম বাস্তবায়ন ফাংশনগুলি একটি স্ট্রাকট প্রদান করতে পারে না। পরিবর্তে তাদের অবশ্যই প্রদানকারী দৃষ্টান্তের একটি তালিকা ফেরত দিতে হবে।
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_existing_rules_immutable_view ডিফল্ট: "সত্য"
সত্যে সেট করা হলে, native.existing_rule এবং native.existing_rules পরিবর্তনযোগ্য নির্দেশের পরিবর্তে লাইটওয়েট অপরিবর্তনীয় ভিউ অবজেক্ট প্রদান করে।
ট্যাগ: build_file_semantics , loading_and_analysis , incompatible_change
--[no]incompatible_java_common_parameters ডিফল্ট: "সত্য"
যদি সত্যে সেট করা হয়, pack_sources-এ output_jar, এবং host_javabase প্যারামিটার এবং কম্পাইলে host_javabase সব মুছে ফেলা হবে।
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_linkopts_to_linklibs ডিফল্ট: "সত্য"
সত্য হিসাবে সেট করা হলে ডিফল্ট টুলচেইনের ডিফল্ট লিঙ্কঅপ্টগুলি cc_toolchain_config এ লিঙ্কঅপ্টের পরিবর্তে লিঙ্কলিব হিসাবে পাস করা হয়
ট্যাগ: action_command_lines , incompatible_change
--[no]incompatible_new_actions_api ডিফল্ট: "সত্য"
যদি সত্যে সেট করা হয়, কর্ম তৈরির API শুধুমাত্র `ctx.actions`-এ উপলব্ধ, `ctx`-এ নয়।
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_no_attr_license ডিফল্ট: "সত্য"
সত্য হিসাবে সেট করা হলে, 'attr.license' ফাংশন নিষ্ক্রিয় করে।
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_no_implicit_file_export ডিফল্ট: "false"
সেট করা থাকলে, (ব্যবহৃত) সোর্স ফাইলগুলি প্যাকেজ ব্যক্তিগত হয় যদি না স্পষ্টভাবে রপ্তানি করা হয়। https://github.com/bazelbuild/proposals/blob/master/designs/2019-10-24-file-visibility.md দেখুন
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_no_rule_outputs_param ডিফল্ট: "মিথ্যা"
সত্যে সেট করা থাকলে, `রুল()` স্টারলার্ক ফাংশনের `আউটপুট` প্যারামিটার নিষ্ক্রিয় করে।
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_require_linker_input_cc_api ডিফল্ট: "সত্য"
সত্যে সেট করা হলে, লাইব্রেরি_টু_লিঙ্কের পরিবর্তে linker_input এর প্রয়োজন হবে create_linking_context এর নিয়ম। লিঙ্কিং_প্রসঙ্গের পুরানো গেটারগুলিও অক্ষম করা হবে এবং শুধু লিঙ্কার_ইনপুটগুলি উপলব্ধ হবে।
ট্যাগ: build_file_semantics , loading_and_analysis , incompatible_change
--[no]incompatible_run_shell_command_string ডিফল্ট: "সত্য"
সত্যে সেট করা হলে, actions.run_shell-এর কমান্ড প্যারামিটার শুধুমাত্র স্ট্রিং গ্রহণ করবে
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_struct_has_no_methods ডিফল্ট: "false"
struct-এর to_json এবং to_proto পদ্ধতিগুলিকে নিষ্ক্রিয় করে, যা struct ক্ষেত্রের নামস্থানকে দূষিত করে। পরিবর্তে, JSON-এর জন্য json.encode বা json.encode_indent, অথবা textproto-এর জন্য proto.encode_text ব্যবহার করুন।
ট্যাগ: build_file_semantics , incompatible_change
--[no]incompatible_top_level_aspects_require_providers ডিফল্ট: "মিথ্যা"
সত্য হিসাবে সেট করা হলে, শীর্ষ স্তরের দিকটি তার প্রয়োজনীয় সরবরাহকারীদের সম্মান করবে এবং শুধুমাত্র শীর্ষ স্তরের লক্ষ্যগুলিতে চলবে যার নিয়মগুলির বিজ্ঞাপন প্রদানকারীরা দিকটির প্রয়োজনীয় প্রদানকারীদের সন্তুষ্ট করে।
ট্যাগ: loading_and_analysis , incompatible_change
--[no]incompatible_use_cc_configure_from_rules_cc ডিফল্ট: "false"
সত্য হলে, Bazel আর @bazel_tools থেকে cc_configure ব্যবহার করার অনুমতি দেবে না। বিস্তারিত এবং মাইগ্রেশন নির্দেশাবলীর জন্য দয়া করে https://github.com/bazelbuild/bazel/issues/10134 দেখুন।
ট্যাগ: loading_and_analysis , incompatible_change
--[no]incompatible_visibility_private_attributes_at_definition ডিফল্ট: "মিথ্যা"
যদি সত্যে সেট করা হয়, তবে ব্যক্তিগত নিয়মের বৈশিষ্ট্যগুলির দৃশ্যমানতা নিয়মের ব্যবহারের পরিবর্তে নিয়মের সংজ্ঞার সাথে পরীক্ষা করা হয়।
ট্যাগ: build_file_semantics , incompatible_change
--max_computation_steps =<a long integer> ডিফল্ট: "0"
স্টারলার্ক কম্পিউটেশনের সর্বাধিক সংখ্যক ধাপ যা একটি বিল্ড ফাইল দ্বারা কার্যকর করা যেতে পারে (শূন্য মানে সীমা নেই)।
ট্যাগ: build_file_semantics
--nested_set_depth_limit =<an integer> ডিফল্ট: "3500"
একটি ডেপসেটের অভ্যন্তরীণ গ্রাফের সর্বাধিক গভীরতা (এটি নেস্টেডসেট নামেও পরিচিত), যার উপরে depset() কনস্ট্রাক্টর ব্যর্থ হবে৷
ট্যাগ: loading_and_analysis
বিল্ড সময়ের অপ্টিমাইজেশন ট্রিগার করে এমন বিকল্পগুলি:
--[no]incompatible_do_not_split_linking_cmdline ডিফল্ট: "সত্য"
সত্য হলে, Bazel আর লিঙ্ক করার জন্য ব্যবহৃত কমান্ড লাইন পতাকাগুলিকে সংশোধন করে না, এবং কোন পতাকাগুলি প্যারাম ফাইলে যাবে এবং কোনটি নয় তা নির্বাচন করে সিদ্ধান্ত নেয় না। বিস্তারিত জানার জন্য https://github.com/bazelbuild/bazel/issues/7670 দেখুন।
ট্যাগ: loading_and_analysis , incompatible_change
--[no]keep_state_after_build ডিফল্ট: "সত্য"
মিথ্যা হলে, বিল্ড শেষ হলে ব্লেজ এই বিল্ড থেকে স্মৃতির অবস্থা বাতিল করবে। পরবর্তী বিল্ডগুলিতে এটির ক্ষেত্রে কোনও বৃদ্ধি হবে না।
ট্যাগ: loses_incremental_state
--skyframe_high_water_mark_threshold =<an integer> ডিফল্ট: "85"
Bazel এর অভ্যন্তরীণ Skyframe ইঞ্জিনের উন্নত কনফিগারেশনের জন্য পতাকা। যদি Bazel সনাক্ত করে যে তার রক্ষিত হিপ শতাংশ ব্যবহার অন্তত এই থ্রেশহোল্ড, এটি অপ্রয়োজনীয় অস্থায়ী স্কাইফ্রেম অবস্থা ড্রপ করবে। এটিকে টুইক করার ফলে আপনি GC থ্র্যাশিং এর প্রাচীরের সময় প্রভাবকে প্রশমিত করতে পারেন, যখন GC থ্র্যাশিং (i) এই অস্থায়ী অবস্থার মেমরি ব্যবহারের কারণে সৃষ্ট হয় এবং (ii) যখন প্রয়োজন হয় তখন রাজ্যটিকে পুনর্গঠন করার চেয়ে বেশি ব্যয়বহুল।
ট্যাগ: host_machine_resource_optimizations
--[no]track_incremental_state ডিফল্ট: "সত্য"
যদি মিথ্যা হয়, তাহলে ব্লেজ এমন ডেটা বজায় রাখবে না যা এই বিল্ডে মেমরি সংরক্ষণ করার জন্য ক্রমবর্ধমান বিল্ডগুলিতে অবৈধকরণ এবং পুনরায় মূল্যায়নের অনুমতি দেয়। পরবর্তী বিল্ডগুলিতে এটির ক্ষেত্রে কোনও বৃদ্ধি হবে না। এটি মিথ্যাতে সেট করার সময় সাধারণত আপনি --batch নির্দিষ্ট করতে চান।
ট্যাগ: loses_incremental_state
বিকল্পগুলি যা শব্দচয়, বিন্যাস বা লগিংয়ের অবস্থানকে প্রভাবিত করে:
--[no]announce_rc ডিফল্ট: "false"
rc অপশন ঘোষণা করা হবে কিনা।
ট্যাগ: affects_outputs
--[no]attempt_to_print_relative_paths ডিফল্ট: "মিথ্যা"
বার্তাগুলির অবস্থানের অংশ মুদ্রণের সময়, ওয়ার্কস্পেস ডিরেক্টরি বা --package_path দ্বারা নির্দিষ্ট ডিরেক্টরিগুলির একটির সাথে সম্পর্কিত একটি পাথ ব্যবহার করার চেষ্টা করুন।
ট্যাগ: terminal_output
--bes_backend =<a string> ডিফল্ট: ""
বিল্ড ইভেন্ট সার্ভিস (BES) ব্যাকএন্ড এন্ডপয়েন্ট [স্কিম://]HOST[:PORT] ফর্মে নির্দিষ্ট করে। ডিফল্ট হল BES আপলোড নিষ্ক্রিয় করা। সমর্থিত স্কিমগুলি হল grpc এবং grpcs (TLS সক্ষম সহ grpc)। যদি কোন স্কিম প্রদান না করা হয়, Bazel grpcs অনুমান করে।
ট্যাগ: affects_outputs
--[no]bes_check_preceding_lifecycle_events ডিফল্ট: "false"
PublishBuildToolEventStreamRequest-এ ফিল্ড check_preceding_lifecycle_events_present সেট করে যা BES কে বলে যে এটি পূর্বে InvocationAttemptStarted এবং BuildEnqueued ইভেন্ট বর্তমান টুল ইভেন্টের সাথে মিলেছে কিনা তা পরীক্ষা করতে।
ট্যাগ: affects_outputs
--bes_header =<a 'name=value' assignment> একাধিক ব্যবহার জমে আছে
NAME=VALUE ফর্মে একটি শিরোনাম নির্দিষ্ট করুন যা BES অনুরোধে অন্তর্ভুক্ত করা হবে। একাধিক শিরোনাম একাধিকবার পতাকা নির্দিষ্ট করে পাস করা যেতে পারে। একই নামের একাধিক মান একটি কমা দ্বারা পৃথক করা তালিকায় রূপান্তরিত হবে৷
ট্যাগ: affects_outputs
--bes_instance_name =<a string> ডিফল্ট: বিবরণ দেখুন
উদাহরণের নাম উল্লেখ করে যার অধীনে BES আপলোড করা BEP টিকে থাকবে। ডিফল্ট থেকে নাল।
ট্যাগ: affects_outputs
--bes_keywords =<comma-separated list of options> একাধিক ব্যবহার জমা হয়
বিইএস ("command_name=<command_name> ", "protocol_name=BEP") প্রকাশিত কীওয়ার্ডের ডিফল্ট সেট যোগ করার জন্য বিজ্ঞপ্তি কীওয়ার্ডের একটি তালিকা নির্দিষ্ট করে। কোনটিতেই ডিফল্ট নয়।
ট্যাগ: affects_outputs
--[no]bes_lifecycle_events ডিফল্ট: "সত্য"
BES জীবনচক্র ইভেন্টগুলি প্রকাশ করতে হবে কিনা তা নির্দিষ্ট করে৷ ('সত্য' থেকে ডিফল্ট)।
ট্যাগ: affects_outputs
--bes_outerr_buffer_size =<an integer> ডিফল্ট: "10240"
একটি অগ্রগতি ইভেন্ট হিসাবে রিপোর্ট করার আগে, BEP-তে বাফার করার জন্য stdout বা stderr-এর সর্বাধিক আকার নির্দিষ্ট করে৷ স্বতন্ত্র লেখাগুলি এখনও একটি একক ইভেন্টে রিপোর্ট করা হয়, এমনকি --bes_outerr_chunk_size পর্যন্ত নির্দিষ্ট মানের থেকে বড় হলেও।
ট্যাগ: affects_outputs
--bes_outerr_chunk_size =<an integer> ডিফল্ট: "1048576"
একটি একক বার্তায় BEP-তে পাঠানোর জন্য stdout বা stderr-এর সর্বাধিক আকার নির্দিষ্ট করে।
ট্যাগ: affects_outputs
--bes_proxy =<a string> ডিফল্ট: বিবরণ দেখুন
একটি প্রক্সির মাধ্যমে বিল্ড ইভেন্ট সার্ভিসের সাথে সংযোগ করুন৷ বর্তমানে এই পতাকাটি শুধুমাত্র একটি ইউনিক্স ডোমেইন সকেট (unix:/path/to/socket) কনফিগার করতে ব্যবহার করা যেতে পারে।
--bes_results_url =<a string> ডিফল্ট: ""
বেস ইউআরএল নির্দিষ্ট করে যেখানে একজন ব্যবহারকারী BES ব্যাকএন্ডে প্রবাহিত তথ্য দেখতে পারে। Bazel টার্মিনালে ইনভোকেশন আইডি দ্বারা যুক্ত URL আউটপুট করবে।
ট্যাগ: terminal_output
--bes_timeout =<An immutable length of time.> ডিফল্ট: "0s"
বিল্ড এবং পরীক্ষা শেষ হওয়ার পরে BES/BEP আপলোড সম্পূর্ণ হওয়ার জন্য বেজেলকে কতক্ষণ অপেক্ষা করতে হবে তা নির্দিষ্ট করে। একটি বৈধ সময়সীমা হল একটি প্রাকৃতিক সংখ্যা যার পরে একটি ইউনিট রয়েছে: দিন (d), ঘন্টা (h), মিনিট (m), সেকেন্ড (গুলি), এবং মিলিসেকেন্ড (ms)। ডিফল্ট মান হল '0' যার মানে কোন সময় শেষ নেই।
ট্যাগ: affects_outputs
--build_event_binary_file =<a string> ডিফল্ট: ""
যদি খালি না থাকে, সেই ফাইলে বিল্ড ইভেন্ট প্রোটোকলের প্রতিনিধিত্বের একটি varint সীমাবদ্ধ বাইনারি উপস্থাপনা লিখুন। এই বিকল্পটি বোঝায় --bes_upload_mode=wait_for_upload_complete।
ট্যাগ: affects_outputs
--[no]build_event_binary_file_path_conversion ডিফল্ট: "true"
বিল্ড ইভেন্ট প্রোটোকলের বাইনারি ফাইল উপস্থাপনার পাথগুলিকে যখনই সম্ভব বিশ্বব্যাপী বৈধ URI-তে রূপান্তর করুন; নিষ্ক্রিয় থাকলে, file:// uri স্কিমটি সর্বদা ব্যবহার করা হবে
ট্যাগ: affects_outputs
--build_event_json_file =<a string> ডিফল্ট: ""
যদি খালি না হয়, সেই ফাইলটিতে বিল্ড ইভেন্ট প্রোটোকলের একটি JSON সিরিয়ালাইজেশন লিখুন।
ট্যাগ: affects_outputs
--[no]build_event_json_file_path_conversion ডিফল্ট: "true"
বিল্ড ইভেন্ট প্রোটোকলের json ফাইলের পাথগুলিকে যখনই সম্ভব বিশ্বব্যাপী বৈধ URI-তে রূপান্তর করুন; নিষ্ক্রিয় থাকলে, file:// uri স্কিমটি সর্বদা ব্যবহার করা হবে
ট্যাগ: affects_outputs
--build_event_max_named_set_of_file_entries =<an integer> ডিফল্ট: "-1"
একটি একক নামের_সেট_অফ_ফাইলস ইভেন্টের জন্য সর্বাধিক সংখ্যক এন্ট্রি; 2-এর থেকে ছোট মান উপেক্ষা করা হয় এবং কোনো ইভেন্ট বিভাজন করা হয় না। এটি বিল্ড ইভেন্ট প্রোটোকলে সর্বাধিক ইভেন্টের আকার সীমিত করার উদ্দেশ্যে করা হয়েছে, যদিও এটি সরাসরি ইভেন্টের আকার নিয়ন্ত্রণ করে না। মোট ইভেন্টের আকার হল সেটের কাঠামোর পাশাপাশি ফাইল এবং ইউরির দৈর্ঘ্যের একটি ফাংশন, যা হ্যাশ ফাংশনের উপর নির্ভর করতে পারে।
ট্যাগ: affects_outputs
--[no]build_event_publish_all_actions ডিফল্ট: "false"
সমস্ত কর্ম প্রকাশ করা উচিত কিনা.
ট্যাগ: affects_outputs
--build_event_text_file =<a string> ডিফল্ট: ""
যদি খালি না থাকে, সেই ফাইলটিতে বিল্ড ইভেন্ট প্রোটোকলের একটি পাঠ্য উপস্থাপনা লিখুন
ট্যাগ: affects_outputs
--[no]build_event_text_file_path_conversion ডিফল্ট: "সত্য"
বিল্ড ইভেন্ট প্রোটোকলের টেক্সট ফাইলের পাথগুলিকে যখনই সম্ভব বিশ্বব্যাপী বৈধ URI-তে রূপান্তর করুন; নিষ্ক্রিয় থাকলে, file:// uri স্কিমটি সর্বদা ব্যবহার করা হবে
ট্যাগ: affects_outputs
--[no]experimental_announce_profile_path ডিফল্ট: "মিথ্যা"
সক্রিয় থাকলে, লগে JSON প্রোফাইল পাথ যোগ করে।
ট্যাগ: bazel_monitoring , affects_outputs
--[no]experimental_bep_target_summary ডিফল্ট: "মিথ্যা"
TargetSummary ইভেন্ট প্রকাশ করবেন কিনা।
--[no]experimental_build_event_expand_filesets ডিফল্ট: "মিথ্যা"
সত্য হলে, আউটপুট ফাইল উপস্থাপন করার সময় BEP-তে ফাইলসেটগুলি প্রসারিত করুন।
ট্যাগ: affects_outputs
সত্য হলে, আউটপুট ফাইলগুলি উপস্থাপন করার সময় BEP-তে আপেক্ষিক ফাইলসেট সিমলিঙ্কগুলি সম্পূর্ণরূপে সমাধান করুন। --পরীক্ষামূলক_বিল্ড_ইভেন্ট_প্রসারিত_ফাইলসেট প্রয়োজন।
ট্যাগ: affects_outputs
--experimental_build_event_upload_strategy =<a string> ডিফল্ট: বিবরণ দেখুন
বিল্ড ইভেন্ট প্রোটোকলে উল্লেখ করা আর্টিফ্যাক্টগুলি কীভাবে আপলোড করবেন তা নির্বাচন করে।
ট্যাগ: affects_outputs
--experimental_profile_additional_tasks =<phase, action, action_check, action_lock, action_release, action_update, action_complete, info, create_package, remote_execution, local_execution, scanner, local_parse, upload_time, process_time, remote_queue, remote_setup, fetch, vfs_stat, vfs_dir, vfs_readlink, vfs_md5, vfs_xattr, vfs_delete, vfs_open, vfs_read, vfs_write, vfs_glob, vfs_vmfs_stat, vfs_vmfs_dir, vfs_vmfs_read, wait, thread_name, thread_sort_index, skyframe_eval, skyfunction, critical_path, critical_path_component, handle_gc_notification, action_counts, local_cpu_usage, system_cpu_usage, local_memory_usage, system_memory_usage, starlark_parser, starlark_user_fn, starlark_builtin_fn, starlark_user_compiled_fn, starlark_repository_fn, action_fs_staging, remote_cache_check, remote_download, remote_network, filesystem_traversal, worker_execution, worker_setup, worker_borrow, worker_working, worker_copying_outputs or unknown> একাধিক ব্যবহার
প্রোফাইলে অন্তর্ভুক্ত করার জন্য অতিরিক্ত প্রোফাইল কাজগুলি নির্দিষ্ট করে।
ট্যাগ: bazel_monitoring , affects_outputs
--[no]experimental_profile_include_primary_output ডিফল্ট: "মিথ্যা"
অ্যাকশন ইভেন্টে অতিরিক্ত "আউট" অ্যাট্রিবিউট অন্তর্ভুক্ত করে যেটিতে অ্যাকশনের প্রাথমিক আউটপুটের exec পাথ রয়েছে।
ট্যাগ: bazel_monitoring , affects_outputs
--[no]experimental_profile_include_target_label ডিফল্ট: "মিথ্যা"
অ্যাকশন ইভেন্টের JSON প্রোফাইল ডেটাতে টার্গেট লেবেল অন্তর্ভুক্ত করে।
ট্যাগ: bazel_monitoring , affects_outputs
--[no]experimental_stream_log_file_uploads ডিফল্ট: "মিথ্যা"
স্ট্রীম লগ ফাইল ডিস্কে লেখার পরিবর্তে সরাসরি রিমোট স্টোরেজে আপলোড করে।
ট্যাগ: affects_outputs
--experimental_workspace_rules_log_file =<a path> ডিফল্ট: বিবরণ দেখুন
নির্দিষ্ট ওয়ার্কস্পেস নিয়ম ইভেন্ট এই ফাইলে সীমাবদ্ধ WorkspaceEvent প্রোটো হিসাবে লগ করুন।
--[no]generate_json_trace_profile ডিফল্ট: "অটো"
সক্ষম হলে, Bazel বিল্ড প্রোফাইল করে এবং আউটপুট বেসের একটি ফাইলে একটি JSON-ফর্ম্যাট প্রোফাইল লেখে। chrome://tracing-এ লোড করে প্রোফাইল দেখুন। ডিফল্টরূপে Bazel সমস্ত বিল্ড-এর মতো কমান্ড এবং ক্যোয়ারির জন্য প্রোফাইল লেখে।
ট্যাগ: bazel_monitoring , affects_outputs
--[no]heap_dump_on_oom ডিফল্ট: "false"
একটি OOM নিক্ষেপ করা হলে ম্যানুয়ালি একটি হিপ ডাম্প আউটপুট করতে হবে কিনা (--experimental_oom_more_eagerly_threshold এর কারণে OOM সহ)। ডাম্পটি <output_base>/<invocation_id>.heapdump.hprof-এ লেখা হবে। এই বিকল্পটি কার্যকরভাবে -XX:+HeapDumpOnOutOfMemoryError প্রতিস্থাপন করে, যার কোন প্রভাব নেই কারণ OOM গুলি ধরা হয় এবং Runtime#halt এ পুনঃনির্দেশিত হয়।
ট্যাগ: bazel_monitoring
--[no]legacy_important_outputs ডিফল্ট: "সত্য"
TargetComplete ইভেন্টে উত্তরাধিকার গুরুত্বপূর্ণ_আউটপুট ক্ষেত্রের প্রজন্মকে দমন করতে এটি ব্যবহার করুন। Bazel থেকে ResultStore ইন্টিগ্রেশনের জন্য গুরুত্বপূর্ণ_আউটপুট প্রয়োজন।
ট্যাগ: affects_outputs
--logging =<0 <= an integer <= 6> ডিফল্ট: "3"
লগিং স্তর.
ট্যাগ: affects_outputs
--memory_profile =<a path> ডিফল্ট: বিবরণ দেখুন
সেট করা থাকলে, ফেজ এন্ডে নির্দিষ্ট ফাইলে মেমরি ব্যবহার ডাটা লিখুন এবং বিল্ডের শেষে মাস্টার লগ থেকে স্ট্যাবল হিপ করুন।
ট্যাগ: bazel_monitoring , affects_outputs
--memory_profile_stable_heap_parameters =<two integers, separated by a comma> ডিফল্ট: "1,0"
বিল্ডের শেষে স্থিতিশীল হিপের মেমরি প্রোফাইলের গণনা টিউন করুন। একটি কমা দ্বারা পৃথক করা দুটি পূর্ণসংখ্যা হওয়া উচিত। প্রথম প্যারামিটার হল GC-এর সংখ্যা। দ্বিতীয় প্যারামিটার হল GC-এর মধ্যে অপেক্ষা করার জন্য সেকেন্ডের সংখ্যা।
ট্যাগ: bazel_monitoring
--profile =<a path> ডিফল্ট: বিবরণ দেখুন
সেট করা হলে, Bazel প্রোফাইল করুন এবং নির্দিষ্ট ফাইলে ডেটা লিখুন। প্রোফাইল বিশ্লেষণ করতে ব্যাজেল বিশ্লেষণ-প্রোফাইল ব্যবহার করুন।
ট্যাগ: bazel_monitoring , affects_outputs
--[no]slim_profile ডিফল্ট: "সত্য"
প্রোফাইলটি খুব বড় হলে ইভেন্টগুলিকে মার্জ করে JSON প্রোফাইলের আকার ছোট করে।
ট্যাগ: bazel_monitoring , affects_outputs
--starlark_cpu_profile =<a string> ডিফল্ট: ""
সমস্ত Starlark থ্রেড দ্বারা CPU ব্যবহারের একটি pprof প্রোফাইল নির্দিষ্ট ফাইলে লেখে।
ট্যাগ: bazel_monitoring
--tool_tag =<a string> ডিফল্ট: ""
এই Bazel আহ্বানের জন্য একটি টুলের নাম।
ট্যাগ: bazel_monitoring , affects_outputs
--ui_event_filters =<Convert list of comma separated event kind to list of filters> একাধিক ব্যবহার জমেছে
UI তে কোন ইভেন্টগুলি দেখাতে হবে তা নির্দিষ্ট করে৷ লিডিং +/- ব্যবহার করে ডিফল্টে ইভেন্ট যোগ করা বা অপসারণ করা সম্ভব, অথবা সরাসরি অ্যাসাইনমেন্টের মাধ্যমে ডিফল্ট সেটটিকে সম্পূর্ণভাবে ওভাররাইড করা সম্ভব। সমর্থিত ইভেন্ট ধরনের সেটের মধ্যে রয়েছে INFO, DEBUG, ERROR এবং আরও অনেক কিছু।
ট্যাগ: terminal_output
বিবিধ বিকল্প, অন্যথায় শ্রেণীবদ্ধ নয়।
--all_incompatible_changes
না-ওপ, সরানো হচ্ছে। https://github.com/bazelbuild/bazel/issues/13892 দেখুন
ট্যাগ: no_op , incompatible_change
--build_metadata =<a 'name=value' assignment> একাধিক ব্যবহার জমে আছে
Custom key-value string pairs to supply in a build event.
Tags: terminal_output
--color =<yes, no or auto> default: "auto"
Use terminal controls to colorize output.
--config =<a string> multiple uses are accumulated
Selects additional config sections from the rc files; for every <command>, it also pulls in the options from <command>:<config> if such a section exists; if this section doesn't exist in any .rc file, Blaze fails with an error. The config sections and flag combinations they are equivalent to are located in the tools/*.blazerc config files.
--curses =<yes, no or auto> default: "auto"
Use terminal cursor controls to minimize scrolling output.
--[no]enable_platform_specific_config default: "false"
If true, Bazel picks up host-OS-specific config lines from bazelrc files. For example, if the host OS is Linux and you run bazel build, Bazel picks up lines starting with build:linux. Supported OS identifiers are linux, macos, windows, freebsd, and openbsd. Enabling this flag is equivalent to using --config=linux on Linux, --config=windows on Windows, etc.
--[no]experimental_windows_watchfs default: "false"
If true, experimental Windows support for --watchfs is enabled. Otherwise --watchfsis a non-op on Windows. Make sure to also enable --watchfs.
--google_auth_scopes =<comma-separated list of options> default: "https://www.googleapis.com/auth/cloud-platform"
A comma-separated list of Google Cloud authentication scopes.
--google_credentials =<a string> default: see description
Specifies the file to get authentication credentials from. See https://cloud.google.com/docs/authentication for details.
--[no]google_default_credentials default: "false"
Whether to use 'Google Application Default Credentials' for authentication. See https://cloud.google.com/docs/authentication for details. Disabled by default.
--grpc_keepalive_time =<An immutable length of time.> default: see description
Configures keep-alive pings for outgoing gRPC connections. If this is set, then Bazel sends pings after this much time of no read operations on the connection, but only if there is at least one pending gRPC call. Times are treated as second granularity; it is an error to set a value less than one second. By default, keep-alive pings are disabled. You should coordinate with the service owner before enabling this setting.
--grpc_keepalive_timeout =<An immutable length of time.> default: "20s"
Configures a keep-alive timeout for outgoing gRPC connections. If keep-alive pings are enabled with --grpc_keepalive_time, then Bazel times out a connection if it does not receive a ping reply after this much time. Times are treated as second granularity; it is an error to set a value less than one second. If keep-alive pings are disabled, then this setting is ignored.
--[no]progress_in_terminal_title default: "false"
Show the command progress in the terminal title. Useful to see what bazel is doing when having multiple terminal tabs.
--[no]show_progress default: "true"
Display progress messages during a build.
--show_progress_rate_limit =<a double> default: "0.2"
Minimum number of seconds between progress messages in the output.
--[no]show_timestamps default: "false"
Include timestamps in messages
--tls_certificate =<a string> default: see description
Specify a path to a TLS certificate that is trusted to sign server certificates.
--tls_client_certificate =<a string> default: see description
Specify the TLS client certificate to use; you also need to provide a client key to enable client authentication.
--tls_client_key =<a string> default: see description
Specify the TLS client key to use; you also need to provide a client certificate to enable client authentication.
--ui_actions_shown =<an integer> default: "8"
Number of concurrent actions shown in the detailed progress bar; each action is shown on a separate line. The progress bar always shows at least one one, all numbers less than 1 are mapped to 1.
Tags: terminal_output
--[no]watchfs default: "false"
On Linux/macOS: If true, bazel tries to use the operating system's file watch service for local changes instead of scanning every file for a change. On Windows: this flag currently is a non-op but can be enabled in conjunction with --experimental_windows_watchfs. On any OS: The behavior is undefined if your workspace is on a network file system, and files are edited on a remote machine.

Analyze-profile Options

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options that affect the verbosity, format or location of logging:
--dump =<text or raw> [ -d ] default: see description
output full profile data dump either in human-readable 'text' format or script-friendly 'raw' format.
Tags: affects_outputs
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.

Aquery Options

Inherits all options from build .

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options relating to query output and semantics:
--aspect_deps =<off, conservative or precise> default: "conservative"
How to resolve aspect dependencies when the output format is one of {xml,proto,record}. 'off' means no aspect dependencies are resolved, 'conservative' (the default) means all declared aspect dependencies are added regardless of whether they are given the rule class of direct dependencies, 'precise' means that only those aspects are added that are possibly active given the rule class of the direct dependencies. Note that precise mode requires loading other packages to evaluate a single target thus making it slower than the other modes. Also note that even precise mode is not completely precise: the decision whether to compute an aspect is decided in the analysis phase, which is not run during 'bazel query'.
Tags: build_file_semantics
--[no]deduplicate_depsets default: "true"
De-duplicate non-leaf children of a dep_set_of_files in the final proto/textproto/json output. This does not deduplicate depsets that don't share an immediate parent. This does not affect the final effective list of input artifacts of the actions.
Tags: terminal_output
--[no]graph:factored default: "true"
If true, then the graph will be emitted 'factored', ie topologically-equivalent nodes will be merged together and their labels concatenated. This option is only applicable to --output=graph.
Tags: terminal_output
--graph:node_limit =<an integer> default: "512"
The maximum length of the label string for a graph node in the output. Longer labels will be truncated; -1 means no truncation. This option is only applicable to --output=graph.
Tags: terminal_output
--[no]implicit_deps default: "true"
If enabled, implicit dependencies will be included in the dependency graph over which the query operates. An implicit dependency is one that is not explicitly specified in the BUILD file but added by bazel. For cquery, this option controls filtering resolved toolchains.
Tags: build_file_semantics
--[no]include_artifacts default: "true"
Includes names of the action inputs and outputs in the output (potentially large).
Tags: terminal_output
--[no]include_aspects default: "true"
aquery, cquery: whether to include aspect-generated actions in the output. query: no-op (aspects are always followed).
Tags: terminal_output
--[no]include_commandline default: "true"
Includes the content of the action command lines in the output (potentially large).
Tags: terminal_output
--[no]include_file_write_contents default: "false"
Include the file contents for the FileWrite and SourceSymlinkManifest actions (potentially large).
Tags: terminal_output
--[no]include_param_files default: "false"
Include the content of the param files used in the command (potentially large). Note: Enabling this flag will automatically enable the --include_commandline flag.
Tags: terminal_output
--[no]incompatible_display_source_file_location default: "true"
True by default, displays the target of the source file. If true, displays the location of line 1 of source files in location outputs. This flag only exists for migration purposes.
Tags: terminal_output , incompatible_change
--[no]infer_universe_scope default: "false"
If set and --universe_scope is unset, then a value of --universe_scope will be inferred as the list of unique target patterns in the query expression. Note that the --universe_scope value inferred for a query expression that uses universe-scoped functions (eg`allrdeps`) may not be what you want, so you should use this option only if you know what you are doing. See https://bazel.build/reference/query#sky-query for details and examples. If --universe_scope is set, then this option's value is ignored. Note: this option applies only to `query` (ie not `cquery`).
Tags: loading_and_analysis
--[no]line_terminator_null default: "false"
Whether each format is terminated with \0 instead of newline.
Tags: terminal_output
--[no]nodep_deps default: "true"
If enabled, deps from "nodep" attributes will be included in the dependency graph over which the query operates. A common example of a "nodep" attribute is "visibility". Run and parse the output of `info build-language` to learn about all the "nodep" attributes in the build language.
Tags: build_file_semantics
--output =<a string> default: "text"
The format in which the aquery results should be printed. Allowed values for aquery are: text, textproto, proto, jsonproto.
Tags: terminal_output
--[no]proto:default_values default: "true"
If true, attributes whose value is not explicitly specified in the BUILD file are included; otherwise they are omitted. This option is applicable to --output=proto
Tags: terminal_output
--[no]proto:definition_stack default: "false"
Populate the definition_stack proto field, which records for each rule instance the Starlark call stack at the moment the rule's class was defined.
Tags: terminal_output
--[no]proto:flatten_selects default: "true"
If enabled, configurable attributes created by select() are flattened. For list types the flattened representation is a list containing each value of the select map exactly once. Scalar types are flattened to null.
Tags: build_file_semantics
--[no]proto:include_synthetic_attribute_hash default: "false"
Whether or not to calculate and populate the $internal_attr_hash attribute.
Tags: terminal_output
--[no]proto:instantiation_stack default: "false"
Populate the instantiation call stack of each rule. Note that this requires the stack to be present
Tags: terminal_output
--[no]proto:locations default: "true"
Whether to output location information in proto output at all.
Tags: terminal_output
--proto:output_rule_attrs =<comma-separated list of options> default: "all"
Comma separated list of attributes to include in output. Defaults to all attributes. Set to empty string to not output any attribute. This option is applicable to --output=proto.
Tags: terminal_output
--[no]proto:rule_inputs_and_outputs default: "true"
Whether or not to populate the rule_input and rule_output fields.
Tags: terminal_output
--[no]relative_locations default: "false"
If true, the location of BUILD files in xml and proto outputs will be relative. By default, the location output is an absolute path and will not be consistent across machines. You can set this option to true to have a consistent result across machines.
Tags: terminal_output
--[no]skyframe_state default: "false"
Without performing extra analysis, dump the current Action Graph from Skyframe. Note: Specifying a target with --skyframe_state is currently not supported. This flag is only available with --output=proto or --output=textproto.
Tags: terminal_output
--[no]tool_deps default: "true"
Query: If disabled, dependencies on 'host configuration' or 'execution' targets will not be included in the dependency graph over which the query operates. A 'host configuration' dependency edge, such as the one from any 'proto_library' rule to the Protocol Compiler, usually points to a tool executed during the build rather than a part of the same 'target' program. Cquery: If disabled, filters out all configured targets which cross a host or execution transition from the top-level target that discovered this configured target. That means if the top-level target is in the target configuration, only configured targets also in the target configuration will be returned. If the top-level target is in the host configuration, only host configured targets will be returned. This option will NOT exclude resolved toolchains.
Tags: build_file_semantics
--universe_scope =<comma-separated list of options> default: ""
A comma-separated set of target patterns (additive and subtractive). The query may be performed in the universe defined by the transitive closure of the specified targets. This option is used for the query and cquery commands. For cquery, the input to this option is the targets all answers are built under and so this option may affect configurations and transitions. If this option is not specified, the top-level targets are assumed to be the targets parsed from the query expression. Note: For cquery, not specifying this option may cause the build to break if targets parsed from the query expression are not buildable with top-level options.
Tags: loading_and_analysis
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.
Options that control build execution:
Whether to make direct file system calls to create symlink trees
Tags: loading_and_analysis , execution , experimental
--[no]experimental_remotable_source_manifests default: "false"
Whether to make source manifest actions remotable
Tags: loading_and_analysis , execution , experimental
--[no]experimental_split_coverage_postprocessing default: "false"
If true, then Bazel will run coverage postprocessing for test in a new spawn.
Tags: execution
--[no]experimental_strict_fileset_output default: "false"
If this option is enabled, filesets will treat all output artifacts as regular files. They will not traverse directories or be sensitive to symlinks.
Tags: execution
--modify_execution_info =<regex=[+-]key,regex=[+-]key,...> default: ""
Add or remove keys from an action's execution info based on action mnemonic. Applies only to actions which support execution info. Many common actions support execution info, eg Genrule, CppCompile, Javac, StarlarkAction, TestRunner. When specifying multiple values, order matters because many regexes may apply to the same mnemonic. Syntax: "regex=[+-]key,regex=[+-]key,...". Examples: '.*=+x,.*=-y,.*=+z' adds 'x' and 'z' to, and removes 'y' from, the execution info for all actions. 'Genrule=+requires-x' adds 'requires-x' to the execution info for all Genrule actions. '(?!Genrule).*=-requires-x' removes 'requires-x' from the execution info for all non-Genrule actions.
Tags: execution , affects_outputs , loading_and_analysis
--persistent_android_resource_processor
Enable the persistent Android resource processor by using workers.
Expands to:
--internal_persistent_busybox_tools
--strategy=AaptPackage=worker
--strategy=AndroidResourceParser=worker
--strategy=AndroidResourceValidator=worker
--strategy=AndroidResourceCompiler=worker
--strategy=RClassGenerator=worker
--strategy=AndroidResourceLink=worker
--strategy=AndroidAapt2=worker
--strategy=AndroidAssetMerger=worker
--strategy=AndroidResourceMerger=worker
--strategy=AndroidCompiledResourceMerger=worker
--strategy=ManifestMerger=worker
--strategy=AndroidManifestMerger=worker
--strategy=Aapt2Optimize=worker
--strategy=AARGenerator=worker

Tags: host_machine_resource_optimizations , execution
Options that configure the toolchain used for action execution:
--android_compiler =<a string> default: see description
The Android target compiler.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--android_crosstool_top =<a build target label> default: "//external:android/crosstool"
The location of the C++ compiler used for Android builds.
Tags: affects_outputs , changes_inputs , loading_and_analysis , loses_incremental_state
--android_grte_top =<a label> default: see description
The Android target grte_top.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--android_manifest_merger =<legacy, android or force_android> default: "android"
Selects the manifest merger to use for android_binary rules. Flag to help thetransition to the Android manifest merger from the legacy merger.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--android_platforms =<a build target label> default: ""
Sets the platforms that android_binary targets use. If multiple platforms are specified, then the binary is a fat APKs, which contains native binaries for each specified target platform.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--android_sdk =<a build target label> default: "@bazel_tools//tools/android:sdk"
Specifies Android SDK/platform that is used to build Android applications.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--apple_compiler =<a string> default: see description
The Apple target compiler. Useful for selecting variants of a toolchain (eg xcode-beta).
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--apple_crosstool_top =<a build target label> default: "@bazel_tools//tools/cpp:toolchain"
The label of the crosstool package to be used in Apple and Objc rules and their dependencies.
Tags: loses_incremental_state , changes_inputs
--apple_grte_top =<a build target label> default: see description
The Apple target grte_top.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--cc_output_directory_tag =<a string> default: ""
Specifies a suffix to be added to the configuration directory.
Tags: affects_outputs , explicit_in_output_path
--compiler =<a string> default: see description
The C++ compiler to use for compiling the target.
Tags: loading_and_analysis , execution
--coverage_output_generator =<a build target label> default: "@bazel_tools//tools/test:lcov_merger"
Location of the binary that is used to postprocess raw coverage reports. This must currently be a filegroup that contains a single file, the binary. Defaults to '//tools/test:lcov_merger'.
Tags: changes_inputs , affects_outputs , loading_and_analysis
--coverage_report_generator =<a build target label> default: "@bazel_tools//tools/test:coverage_report_generator"
Location of the binary that is used to generate coverage reports. This must currently be a filegroup that contains a single file, the binary. Defaults to '//tools/test:coverage_report_generator'.
Tags: changes_inputs , affects_outputs , loading_and_analysis
--coverage_support =<a build target label> default: "@bazel_tools//tools/test:coverage_support"
Location of support files that are required on the inputs of every test action that collects code coverage. Defaults to '//tools/test:coverage_support'.
Tags: changes_inputs , affects_outputs , loading_and_analysis
--crosstool_top =<a build target label> default: "@bazel_tools//tools/cpp:toolchain"
The label of the crosstool package to be used for compiling C++ code.
Tags: loading_and_analysis , changes_inputs , affects_outputs
--custom_malloc =<a build target label> default: see description
Specifies a custom malloc implementation. This setting overrides malloc attributes in build rules.
Tags: changes_inputs , affects_outputs
--experimental_add_exec_constraints_to_targets =<a '<RegexFilter>=<label1>[,<label2>,...]' assignment> multiple uses are accumulated
List of comma-separated regular expressions, each optionally prefixed by - (negative expression), assigned (=) to a list of comma-separated constraint value targets. If a target matches no negative expression and at least one positive expression its toolchain resolution will be performed as if it had declared the constraint values as execution constraints. Example: //demo,-test=@platforms//cpus:x86_64 will add 'x86_64' to any target under //demo except for those whose name contains 'test'.
Tags: loading_and_analysis
--[no]experimental_enable_objc_cc_deps default: "true"
Allows objc_* rules to depend on cc_library and causes any objc dependencies to be built with --cpu set to "ios_<--ios_cpu>" for any values in --ios_multi_cpu.
Tags: loading_and_analysis , incompatible_change
--[no]experimental_include_xcode_execution_requirements default: "false"
If set, add a "requires-xcode:{version}" execution requirement to every Xcode action. If the xcode version has a hyphenated label, also add a "requires-xcode-label:{version_label}" execution requirement.
Tags: loses_incremental_state , loading_and_analysis , execution
--[no]experimental_prefer_mutual_xcode default: "true"
If true, use the most recent Xcode that is available both locally and remotely. If false, or if there are no mutual available versions, use the local Xcode version selected via xcode-select.
Tags: loses_incremental_state
--extra_execution_platforms =<comma-separated list of options> multiple uses are accumulated
The platforms that are available as execution platforms to run actions. Platforms can be specified by exact target, or as a target pattern. These platforms will be considered before those declared in the WORKSPACE file by register_execution_platforms().
Tags: execution
--extra_toolchains =<comma-separated list of options> multiple uses are accumulated
The toolchain rules to be considered during toolchain resolution. Toolchains can be specified by exact target, or as a target pattern. These toolchains will be considered before those declared in the WORKSPACE file by register_toolchains().
Tags: affects_outputs , changes_inputs , loading_and_analysis
--grte_top =<a label> default: see description
A label to a checked-in libc library. The default value is selected by the crosstool toolchain, and you almost never need to override it.
Tags: action_command_lines , affects_outputs
--host_compiler =<a string> default: see description
The C++ compiler to use for host compilation. It is ignored if --host_crosstool_top is not set.
Tags: loading_and_analysis , execution
--host_crosstool_top =<a build target label> default: see description
By default, the --crosstool_top and --compiler options are also used for the host configuration. If this flag is provided, Bazel uses the default libc and compiler for the given crosstool_top.
Tags: loading_and_analysis , changes_inputs , affects_outputs
--host_grte_top =<a label> default: see description
If specified, this setting overrides the libc top-level directory (--grte_top) for the host configuration.
Tags: action_command_lines , affects_outputs
--host_platform =<a build target label> default: ""
The label of a platform rule that describes the host system.
Tags: affects_outputs , changes_inputs , loading_and_analysis
--[no]incompatible_disable_expand_if_all_available_in_flag_set default: "true"
If true, Bazel will not allow specifying expand_if_all_available in flag_sets(see https://github.com/bazelbuild/bazel/issues/7008 for migration instructions).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_dont_enable_host_nonhost_crosstool_features default: "true"
If true, Bazel will not enable 'host' and 'nonhost' features in the c++ toolchain (see https://github.com/bazelbuild/bazel/issues/7407 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enable_android_toolchain_resolution default: "false"
Use toolchain resolution to select the Android SDK for android rules (Starlark and native)
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enable_apple_toolchain_resolution default: "false"
Use toolchain resolution to select the Apple SDK for apple rules (Starlark and native)
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_make_thinlto_command_lines_standalone default: "true"
If true, Bazel will not reuse C++ link action command lines for lto indexing command lines (see https://github.com/bazelbuild/bazel/issues/6791 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain default: "true"
If true, Bazel will complain when cc_toolchain.cpu and cc_toolchain.compiler attributes are set (see https://github.com/bazelbuild/bazel/issues/7075 for migration instructions).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_remove_legacy_whole_archive default: "true"
If true, Bazel will not link library dependencies as whole archive by default (see https://github.com/bazelbuild/bazel/issues/7362 for migration instructions).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_require_ctx_in_configure_features default: "true"
If true, Bazel will require 'ctx' parameter in to cc_common.configure_features (see https://github.com/bazelbuild/bazel/issues/7793 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]interface_shared_objects default: "true"
Use interface shared objects if supported by the toolchain. All ELF toolchains currently support this setting.
Tags: loading_and_analysis , affects_outputs , affects_outputs
--ios_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the iOS SDK to use to build iOS applications. If unspecified, uses default iOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--macos_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the macOS SDK to use to build macOS applications. If unspecified, uses default macOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--minimum_os_version =<a string> default: see description
The minimum OS version which your compilation targets.
Tags: loading_and_analysis , affects_outputs
--platform_mappings =<a relative path> default: ""
The location of a mapping file that describes which platform to use if none is set or which flags to set when a platform already exists. Must be relative to the main workspace root. Defaults to 'platform_mappings' (a file directly under the workspace root).
Tags: affects_outputs , changes_inputs , loading_and_analysis
--platforms =<a build target label> default: ""
The labels of the platform rules describing the target platforms for the current command.
Tags: affects_outputs , changes_inputs , loading_and_analysis
--python2_path =<a string> default: see description
Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.
Tags: no_op , deprecated
--python3_path =<a string> default: see description
Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.
Tags: no_op , deprecated
--python_path =<a string> default: see description
The absolute path of the Python interpreter invoked to run Python targets on the target platform. Deprecated; disabled by --incompatible_use_python_toolchains.
Tags: loading_and_analysis , affects_outputs
--python_top =<a build target label> default: see description
The label of a py_runtime representing the Python interpreter invoked to run Python targets on the target platform. Deprecated; disabled by --incompatible_use_python_toolchains.
Tags: loading_and_analysis , affects_outputs
--target_platform_fallback =<a build target label> default: "@local_config_platform//:host"
The label of a platform rule that should be used if no target platform is set and no platform mapping matches the current set of flags.
Tags: affects_outputs , changes_inputs , loading_and_analysis
--tvos_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the tvOS SDK to use to build tvOS applications. If unspecified, uses default tvOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--watchos_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the watchOS SDK to use to build watchOS applications. If unspecified, uses default watchOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--xcode_version =<a string> default: see description
If specified, uses Xcode of the given version for relevant build actions. If unspecified, uses the executor default version of Xcode.
Tags: loses_incremental_state
--xcode_version_config =<a build target label> default: "@bazel_tools//tools/cpp:host_xcodes"
The label of the xcode_config rule to be used for selecting the Xcode version in the build configuration.
Tags: loses_incremental_state , loading_and_analysis
Options that control the output of the command:
--[no]apple_enable_auto_dsym_dbg default: "false"
Whether to force enable generating debug symbol(.dSYM) file(s) for dbg builds.
Tags: affects_outputs , action_command_lines
--[no]apple_generate_dsym default: "false"
Whether to generate debug symbol(.dSYM) file(s).
Tags: affects_outputs , action_command_lines
If true, build runfiles symlink forests for all targets. If false, write only manifests when possible.
Tags: affects_outputs
--[no]build_runfile_manifests default: "true"
If true, write runfiles manifests for all targets. If false, omit them. Local tests will fail to run when false.
Tags: affects_outputs
--[no]build_test_dwp default: "false"
If enabled, when building C++ tests statically and with fission the .dwp file for the test binary will be automatically built as well.
Tags: loading_and_analysis , affects_outputs
--cc_proto_library_header_suffixes =<comma-separated list of options> default: ".pb.h"
Sets the prefixes of header files that a cc_proto_library creates.
Tags: affects_outputs , loading_and_analysis
--cc_proto_library_source_suffixes =<comma-separated list of options> default: ".pb.cc"
Sets the prefixes of source files that a cc_proto_library creates.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_proto_descriptor_sets_include_source_info default: "false"
Run extra actions for alternative Java api versions in a proto_library.
Tags: affects_outputs , loading_and_analysis , experimental
--[no]experimental_proto_extra_actions default: "false"
Run extra actions for alternative Java api versions in a proto_library.
Tags: affects_outputs , loading_and_analysis , experimental
--[no]experimental_save_feature_state default: "false"
Save the state of enabled and requested feautres as an output of compilation.
Tags: affects_outputs , experimental
--fission =<a set of compilation modes> default: "no"
Specifies which compilation modes use fission for C++ compilations and links. May be any combination of {'fastbuild', 'dbg', 'opt'} or the special values 'yes' to enable all modes and 'no' to disable all modes.
Tags: loading_and_analysis , action_command_lines , affects_outputs
--[no]legacy_external_runfiles default: "true"
If true, build runfiles symlink forests for external repositories under .runfiles/wsname/external/repo (in addition to .runfiles/repo).
Tags: affects_outputs
--[no]objc_generate_linkmap default: "false"
Specifies whether to generate a linkmap file.
Tags: affects_outputs
--[no]save_temps default: "false"
If set, temporary outputs from gcc will be saved. These include .s files (assembler code), .i files (preprocessed C) and .ii files (preprocessed C++).
Tags: affects_outputs
Options that let the user configure the intended output, affecting its value, as opposed to its existence:
--action_env =<a 'name=value' assignment with an optional value part> multiple uses are accumulated
Specifies the set of environment variables available to actions with target configuration. Variables can be either specified by name, in which case the value will be taken from the invocation environment, or by the name=value pair which sets the value independent of the invocation environment. This option can be used multiple times; for options given for the same variable, the latest wins, options for different variables accumulate.
Tags: action_command_lines
--android_cpu =<a string> default: "armeabi-v7a"
The Android target CPU.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]android_databinding_use_androidx default: "false"
Generate AndroidX-compatible data-binding files. This is only used with databinding v2.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--[no]android_databinding_use_v3_4_args default: "false"
Use android databinding v2 with 3.4.0 argument
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--android_dynamic_mode =<off, default or fully> default: "off"
Determines whether C++ deps of Android rules will be linked dynamically when a cc_binary does not explicitly create a shared library. 'default' means bazel will choose whether to link dynamically. 'fully' means all libraries will be linked dynamically. 'off' means that all libraries will be linked in mostly static mode.
Tags: affects_outputs , loading_and_analysis
--android_manifest_merger_order =<alphabetical, alphabetical_by_configuration or dependency> default: "alphabetical"
Sets the order of manifests passed to the manifest merger for Android binaries. ALPHABETICAL means manifests are sorted by path relative to the execroot. ALPHABETICAL_BY_CONFIGURATION means manifests are sorted by paths relative to the configuration directory within the output directory. DEPENDENCY means manifests are ordered with each library's manifest coming before the manifests of its dependencies.
Tags: action_command_lines , execution
--[no]android_resource_shrinking default: "false"
Enables resource shrinking for android_binary APKs that use ProGuard.
Tags: affects_outputs , loading_and_analysis
--apple_bitcode =<'mode' or 'platform=mode', where 'mode' is none, embedded_markers or embedded, and 'platform' is ios, watchos, tvos, macos or catalyst> multiple uses are accumulated
Specify the Apple bitcode mode for compile steps targeting device architectures. Values are of the form '[platform=]mode', where the platform (which must be 'ios', 'macos', 'tvos', or 'watchos') is optional. If provided, the bitcode mode is applied for that platform specifically; if omitted, it is applied for all platforms. The mode must be 'none', 'embedded_markers', or 'embedded'. This option may be provided multiple times.
Tags: loses_incremental_state
--[no]build_python_zip default: "auto"
Build python executable zip; on on Windows, off on other platforms
Tags: affects_outputs
--catalyst_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple Catalyst binaries.
Tags: loses_incremental_state , loading_and_analysis
--[no]collect_code_coverage default: "false"
If specified, Bazel will instrument code (using offline instrumentation where possible) and will collect coverage information during tests. Only targets that match --instrumentation_filter will be affected. Usually this option should not be specified directly - 'bazel coverage' command should be used instead.
Tags: affects_outputs
--compilation_mode =<fastbuild, dbg or opt> [ -c ] default: "fastbuild"
Specify the mode the binary will be built in. Values: 'fastbuild', 'dbg', 'opt'.
Tags: affects_outputs , action_command_lines , explicit_in_output_path
--conlyopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when compiling C source files.
Tags: action_command_lines , affects_outputs
--copt =<a string> multiple uses are accumulated
Additional options to pass to gcc.
Tags: action_command_lines , affects_outputs
--cpu =<a string> default: ""
The target CPU.
Tags: changes_inputs , affects_outputs , explicit_in_output_path
--cs_fdo_absolute_path =<a string> default: see description
Use CSFDO profile information to optimize compilation. Specify the absolute path name of the zip file containing the profile file, a raw or an indexed LLVM profile file.
Tags: affects_outputs
--cs_fdo_instrument =<a string> default: see description
Generate binaries with context sensitive FDO instrumentation. With Clang/LLVM compiler, it also accepts the directory name under which the raw profile file(s) will be dumped at runtime.
Tags: affects_outputs
--cs_fdo_profile =<a build target label> default: see description
The cs_fdo_profile representing the context sensitive profile to be used for optimization.
Tags: affects_outputs
--cxxopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when compiling C++ source files.
Tags: action_command_lines , affects_outputs
--define =<a 'name=value' assignment> multiple uses are accumulated
Each --define option specifies an assignment for a build variable.
Tags: changes_inputs , affects_outputs
--dynamic_mode =<off, default or fully> default: "default"
Determines whether C++ binaries will be linked dynamically. 'default' means Bazel will choose whether to link dynamically. 'fully' means all libraries will be linked dynamically. 'off' means that all libraries will be linked in mostly static mode.
Tags: loading_and_analysis , affects_outputs
--[no]enable_fdo_profile_absolute_path default: "true"
If set, use of fdo_absolute_profile_path will raise an error.
Tags: affects_outputs
--[no]enable_runfiles default: "auto"
Enable runfiles symlink tree; By default, it's off on Windows, on on other platforms.
Tags: affects_outputs
--experimental_action_listener =<a build target label> multiple uses are accumulated
Deprecated in favor of aspects. Use action_listener to attach an extra_action to existing build actions.
Tags: execution , experimental
--[no]experimental_android_compress_java_resources default: "false"
Compress Java resources in APKs
Tags: affects_outputs , loading_and_analysis , experimental
--[no]experimental_android_databinding_v2 default: "false"
Use android databinding v2
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--[no]experimental_android_resource_shrinking default: "false"
Enables resource shrinking for android_binary APKs that use ProGuard.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_android_rewrite_dexes_with_rex default: "false"
use rex tool to rewrite dex files
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--experimental_objc_fastbuild_options =<comma-separated list of options> default: "-O0,-DDEBUG=1"
Uses these strings as objc fastbuild compiler options.
Tags: action_command_lines
--[no]experimental_omitfp default: "false"
If true, use libunwind for stack unwinding, and compile with -fomit-frame-pointer and -fasynchronous-unwind-tables.
Tags: action_command_lines , affects_outputs , experimental
--[no]experimental_platform_in_output_dir default: "false"
If true, the target platform is used in the output directory name instead of the CPU.
Tags: affects_outputs , experimental
--[no]experimental_use_llvm_covmap default: "false"
If specified, Bazel will generate llvm-cov coverage map information rather than gcov when collect_code_coverage is enabled.
Tags: changes_inputs , affects_outputs , loading_and_analysis , experimental
--fat_apk_cpu =<comma-separated list of options> default: "armeabi-v7a"
Setting this option enables fat APKs, which contain native binaries for all specified target architectures, eg, --fat_apk_cpu=x86,armeabi-v7a. If this flag is specified, then --android_cpu is ignored for dependencies of android_binary rules.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]fat_apk_hwasan default: "false"
Whether to create HWASAN splits.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--fdo_instrument =<a string> default: see description
Generate binaries with FDO instrumentation. With Clang/LLVM compiler, it also accepts the directory name under which the raw profile file(s) will be dumped at runtime.
Tags: affects_outputs
--fdo_optimize =<a string> default: see description
Use FDO profile information to optimize compilation. Specify the name of a zip file containing a .gcda file tree, an afdo file containing an auto profile, or an LLVM profile file. This flag also accepts files specified as labels (eg `//foo/bar:file.afdo` - you may need to add an `exports_files` directive to the corresponding package) and labels pointing to `fdo_profile` targets. This flag will be superseded by the `fdo_profile` rule.
Tags: affects_outputs
--fdo_prefetch_hints =<a build target label> default: see description
Use cache prefetch hints.
Tags: affects_outputs
--fdo_profile =<a build target label> default: see description
The fdo_profile representing the profile to be used for optimization.
Tags: affects_outputs
--features =<a string> multiple uses are accumulated
The given features will be enabled or disabled by default for all packages. Specifying -<feature> will disable the feature globally. Negative features always override positive ones. This flag is used to enable rolling out default feature changes without a Bazel release.
Tags: changes_inputs , affects_outputs
--[no]force_pic default: "false"
If enabled, all C++ compilations produce position-independent code ("-fPIC"), links prefer PIC pre-built libraries over non-PIC libraries, and links produce position-independent executables ("-pie").
Tags: loading_and_analysis , affects_outputs
--host_action_env =<a 'name=value' assignment with an optional value part> multiple uses are accumulated
Specifies the set of environment variables available to actions with host or execution configurations. Variables can be either specified by name, in which case the value will be taken from the invocation environment, or by the name=value pair which sets the value independent of the invocation environment. This option can be used multiple times; for options given for the same variable, the latest wins, options for different variables accumulate.
Tags: action_command_lines
--host_compilation_mode =<fastbuild, dbg or opt> default: "opt"
Specify the mode the tools used during the build will be built in. Values: 'fastbuild', 'dbg', 'opt'.
Tags: affects_outputs , action_command_lines
--host_conlyopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when compiling C source files for host tools.
Tags: action_command_lines , affects_outputs
--host_copt =<a string> multiple uses are accumulated
Additional options to pass to gcc for host tools.
Tags: action_command_lines , affects_outputs
--host_cpu =<a string> default: ""
The host CPU.
Tags: changes_inputs , affects_outputs
--host_cxxopt =<a string> multiple uses are accumulated
Additional options to pass to gcc for host tools.
Tags: action_command_lines , affects_outputs
--host_force_python =<PY2 or PY3> default: see description
Overrides the Python version for the host configuration. Can be "PY2" or "PY3".
Tags: loading_and_analysis , affects_outputs
--host_linkopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when linking host tools.
Tags: action_command_lines , affects_outputs
--host_macos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible macOS version for host targets. If unspecified, uses 'macos_sdk_version'.
Tags: loses_incremental_state
--host_swiftcopt =<a string> multiple uses are accumulated
Additional options to pass to swiftc for host tools.
Tags: action_command_lines , affects_outputs
--[no]incompatible_avoid_conflict_dlls default: "true"
If enabled, all C++ dynamic linked libraries (DLLs) generated by cc_library on Windows will be renamed to name_{hash}.dll where hash is calculated based on the RepositoryName and the DLL's package path. This option is useful when you have one package which depends on severals cc_library with the same name (eg //foo/bar1:utils and //foo/bar2:utils).
Tags: loading_and_analysis , affects_outputs , incompatible_change
--[no]incompatible_merge_genfiles_directory default: "true"
If true, the genfiles directory is folded into the bin directory.
Tags: affects_outputs , incompatible_change
--[no]incompatible_use_platforms_repo_for_constraints default: "false"
If true, constraint settings from @bazel_tools are removed.
Tags: affects_outputs , incompatible_change
--[no]instrument_test_targets default: "false"
When coverage is enabled, specifies whether to consider instrumenting test rules. When set, test rules included by --instrumentation_filter are instrumented. Otherwise, test rules are always excluded from coverage instrumentation.
Tags: affects_outputs
--instrumentation_filter =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths> default: "-/javatests[/:],-/test/java[/:]"
When coverage is enabled, only rules with names included by the specified regex-based filter will be instrumented. Rules prefixed with '-' are excluded instead. Note that only non-test rules are instrumented unless --instrument_test_targets is enabled.
Tags: affects_outputs
--ios_cpu =<a string> default: "x86_64"
Specifies to target CPU of iOS compilation.
Tags: no_op , deprecated
--ios_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible iOS version for target simulators and devices. If unspecified, uses 'ios_sdk_version'.
Tags: loses_incremental_state
--ios_multi_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures to build an ios_application with. The result is a universal binary containing all specified architectures.
Tags: loses_incremental_state , loading_and_analysis
--[no]legacy_whole_archive default: "true"
Deprecated, superseded by --incompatible_remove_legacy_whole_archive (see https://github.com/bazelbuild/bazel/issues/7362 for details). When on, use --whole-archive for cc_binary rules that have linkshared=1 and either linkstatic=1 or '-static' in linkopts. This is for backwards compatibility only. A better alternative is to use alwayslink=1 where required.
Tags: action_command_lines , affects_outputs , deprecated
--linkopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when linking.
Tags: action_command_lines , affects_outputs
--ltobackendopt =<a string> multiple uses are accumulated
Additional option to pass to the LTO backend step (under --features=thin_lto).
Tags: action_command_lines , affects_outputs
--ltoindexopt =<a string> multiple uses are accumulated
Additional option to pass to the LTO indexing step (under --features=thin_lto).
Tags: action_command_lines , affects_outputs
--macos_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple macOS binaries.
Tags: loses_incremental_state , loading_and_analysis
--macos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible macOS version for targets. If unspecified, uses 'macos_sdk_version'.
Tags: loses_incremental_state
--[no]objc_debug_with_GLIBCXX default: "false"
If set, and compilation mode is set to 'dbg', define GLIBCXX_DEBUG, GLIBCXX_DEBUG_PEDANTIC and GLIBCPP_CONCEPT_CHECKS.
Tags: action_command_lines
--[no]objc_enable_binary_stripping default: "false"
Whether to perform symbol and dead-code strippings on linked binaries. Binary strippings will be performed if both this flag and --compilation_mode=opt are specified.
Tags: action_command_lines
--objccopt =<a string> multiple uses are accumulated
Additional options to pass to gcc when compiling Objective-C/C++ source files.
Tags: action_command_lines
--per_file_copt =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths followed by an @ and a comma separated list of options> multiple uses are accumulated
Additional options to selectively pass to gcc when compiling certain files. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --per_file_copt=//foo/.*\.cc,-//foo/bar\.cc@-O0 adds the -O0 command line option to the gcc command line of all cc files in //foo/ except bar.cc.
Tags: action_command_lines , affects_outputs
--per_file_ltobackendopt =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths followed by an @ and a comma separated list of options> multiple uses are accumulated
Additional options to selectively pass to LTO backend (under --features=thin_lto) when compiling certain backend objects. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns. option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --per_file_ltobackendopt=//foo/.*\.o,-//foo/bar\.o@-O0 adds the -O0 command line option to the LTO backend command line of all o files in //foo/ except bar.o.
Tags: action_command_lines , affects_outputs
--platform_suffix =<a string> default: see description
Specifies a suffix to be added to the configuration directory.
Tags: loses_incremental_state , affects_outputs , loading_and_analysis
--propeller_optimize =<a build target label> default: see description
Use Propeller profile information to optimize the build target.A propeller profile must consist of at least one of two files, a cc profile and a ld profile. This flag accepts a build label which must refer to the propeller profile input files. For example, the BUILD file that defines the label, in a/b/BUILD:propeller_optimize( name = "propeller_profile", cc_profile = "propeller_cc_profile.txt", ld_profile = "propeller_ld_profile.txt",)An exports_files directive may have to be added to the corresponding package to make these files visible to Bazel. The option must be used as: --propeller_optimize=//a/b:propeller_profile
Tags: action_command_lines , affects_outputs
--propeller_optimize_absolute_cc_profile =<a string> default: see description
Absolute path name of cc_profile file for Propeller Optimized builds.
Tags: affects_outputs
--propeller_optimize_absolute_ld_profile =<a string> default: see description
Absolute path name of ld_profile file for Propeller Optimized builds.
Tags: affects_outputs
--run_under =<a prefix in front of command> default: see description
Prefix to insert before the executables for the 'test' and 'run' commands. If the value is 'foo -bar', and the execution command line is 'test_binary -baz', then the final command line is 'foo -bar test_binary -baz'.This can also be a label to an executable target. Some examples are: 'valgrind', 'strace', 'strace -c', 'valgrind --quiet --num-callers=20', '//package:target', '//package:target --options'.
Tags: action_command_lines
--[no]share_native_deps default: "true"
If true, native libraries that contain identical functionality will be shared among different targets
Tags: loading_and_analysis , affects_outputs
--[no]stamp default: "false"
Stamp binaries with the date, username, hostname, workspace information, etc.
Tags: affects_outputs
--strip =<always, sometimes or never> default: "sometimes"
Specifies whether to strip binaries and shared libraries (using "-Wl,--strip-debug"). The default value of 'sometimes' means strip iff --compilation_mode=fastbuild.
Tags: affects_outputs
--stripopt =<a string> multiple uses are accumulated
Additional options to pass to strip when generating a '<name>.stripped' binary.
Tags: action_command_lines , affects_outputs
--swiftcopt =<a string> multiple uses are accumulated
Additional options to pass to Swift compilation.
Tags: action_command_lines
--tvos_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple tvOS binaries.
Tags: loses_incremental_state , loading_and_analysis
--tvos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible tvOS version for target simulators and devices. If unspecified, uses 'tvos_sdk_version'.
Tags: loses_incremental_state
--watchos_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple watchOS binaries.
Tags: loses_incremental_state , loading_and_analysis
--watchos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible watchOS version for target simulators and devices. If unspecified, uses 'watchos_sdk_version'.
Tags: loses_incremental_state
--xbinary_fdo =<a build target label> default: see description
Use XbinaryFDO profile information to optimize compilation. Specify the name of default cross binary profile. When the option is used together with --fdo_instrument/--fdo_optimize/--fdo_profile, those options will always prevail as if xbinary_fdo is never specified.
Tags: affects_outputs
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--auto_cpu_environment_group =<a build target label> default: ""
Declare the environment_group to use for automatically mapping cpu values to target_environment values.
Tags: changes_inputs , loading_and_analysis , experimental
--[no]check_licenses default: "false"
Check that licensing constraints imposed by dependent packages do not conflict with distribution modes of the targets being built. By default, licenses are not checked.
Tags: build_file_semantics
--[no]check_visibility default: "true"
If disabled, visibility errors are demoted to warnings.
Tags: build_file_semantics
--[no]desugar_for_android default: "true"
Whether to desugar Java 8 bytecode before dexing.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]enforce_constraints default: "true"
Checks the environments each target is compatible with and reports errors if any target has dependencies that don't support the same environments
Tags: build_file_semantics
--[no]experimental_allow_android_library_deps_without_srcs default: "false"
Flag to help transition from allowing to disallowing srcs-less android_library rules with deps. The depot needs to be cleaned up to roll this out by default.
Tags: eagerness_to_exit , loading_and_analysis
--[no]experimental_check_desugar_deps default: "true"
Whether to double-check correct desugaring at Android binary level.
Tags: eagerness_to_exit , loading_and_analysis , experimental
--[no]experimental_desugar_java8_libs default: "false"
Whether to include supported Java 8 libraries in apps for legacy devices.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--experimental_import_deps_checking =<off, warning or error> default: "OFF"
When enabled, check whether the dependencies of an aar_import are complete. This enforcement can break the build, or can just result in warnings.
Tags: loading_and_analysis
--experimental_strict_java_deps =<off, warn, error, strict or default> default: "default"
If true, checks that a Java target explicitly declares all directly used targets as dependencies.
Tags: build_file_semantics , eagerness_to_exit
--[no]incompatible_disable_native_android_rules default: "false"
If enabled, direct usage of the native Android rules is disabled. Please use the Starlark Android rules from https://github.com/bazelbuild/rules_android
Tags: eagerness_to_exit , incompatible_change
--[no]incompatible_disable_native_apple_binary_rule default: "false"
No-op. Kept here for backwards compatibility.
Tags: eagerness_to_exit , incompatible_change
--[no]incompatible_force_strict_header_check_from_starlark default: "true"
If enabled, set strict header checking in the Starlark API
Tags: loading_and_analysis , changes_inputs , incompatible_change
--[no]incompatible_validate_top_level_header_inclusions default: "true"
If true, Bazel will also validate top level directory header inclusions (see https://github.com/bazelbuild/bazel/issues/10047 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]strict_filesets default: "false"
If this option is enabled, filesets crossing package boundaries are reported as errors. It does not work when check_fileset_dependencies_recursively is disabled.
Tags: build_file_semantics , eagerness_to_exit
--strict_proto_deps =<off, warn, error, strict or default> default: "error"
Unless OFF, checks that a proto_library target explicitly declares all directly used targets as dependencies.
Tags: build_file_semantics , eagerness_to_exit , incompatible_change
--strict_public_imports =<off, warn, error, strict or default> default: "off"
Unless OFF, checks that a proto_library target explicitly declares all targets used in 'import public' as exported.
Tags: build_file_semantics , eagerness_to_exit , incompatible_change
--[no]strict_system_includes default: "false"
If true, headers found through system include paths (-isystem) are also required to be declared.
Tags: loading_and_analysis , eagerness_to_exit
--target_environment =<a build target label> multiple uses are accumulated
Declares this build's target environment. Must be a label reference to an "environment" rule. If specified, all top-level targets must be compatible with this environment.
Tags: changes_inputs
Options that affect the signing outputs of a build:
--apk_signing_method =<v1, v2, v1_v2 or v4> default: "v1_v2"
Implementation to use to sign APKs
Tags: action_command_lines , affects_outputs , loading_and_analysis
--[no]device_debug_entitlements default: "true"
If set, and compilation mode is not 'opt', objc apps will include debug entitlements when signing.
Tags: changes_inputs
--ios_signing_cert_name =<a string> default: see description
Certificate name to use for iOS signing. If not set will fall back to provisioning profile. May be the certificate's keychain identity preference or (substring) of the certificate's common name, as per codesign's man page (SIGNING IDENTITIES).
Tags: action_command_lines
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]incompatible_disallow_legacy_py_provider default: "true"
No-op, will be removed soon.
Tags: loading_and_analysis , incompatible_change
Options that govern the behavior of the test environment or test runner:
--[no]allow_analysis_failures default: "false"
If true, an analysis failure of a rule target results in the target's propagation of an instance of AnalysisFailureInfo containing the error description, instead of resulting in a build failure.
Tags: loading_and_analysis , experimental
--analysis_testing_deps_limit =<an integer> default: "2000"
Sets the maximum number of transitive dependencies through a rule attribute with a for_analysis_testing configuration transition. Exceeding this limit will result in a rule error.
Tags: loading_and_analysis
--[no]break_build_on_parallel_dex2oat_failure default: "false"
If true dex2oat action failures will cause the build to break instead of executing dex2oat during test runtime.
Tags: loading_and_analysis , experimental
--[no]experimental_android_use_parallel_dex2oat default: "false"
Use dex2oat in parallel to possibly speed up android_test.
Tags: loading_and_analysis , host_machine_resource_optimizations , experimental
--[no]ios_memleaks default: "false"
Enable checking for memory leaks in ios_test targets.
Tags: action_command_lines
--ios_simulator_device =<a string> default: see description
The device to simulate when running an iOS application in the simulator, eg 'iPhone 6'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.
Tags: test_runner
--ios_simulator_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
The version of iOS to run on the simulator when running or testing. This is ignored for ios_test rules if a target device is specified in the rule.
Tags: test_runner
--runs_per_test =<a positive integer or test_regex@runs. This flag may be passed more than once> multiple uses are accumulated
Specifies number of times to run each test. If any of those attempts fail for any reason, the whole test is considered failed. Normally the value specified is just an integer. Example: --runs_per_test=3 will run all tests 3 times. Alternate syntax: regex_filter@runs_per_test. Where runs_per_test stands for an integer value and regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). Example: --runs_per_test=//foo/.*,-//foo/bar/.*@3 runs all tests in //foo/ except those under foo/bar three times. This option can be passed multiple times. The most recently passed argument that matches takes precedence. If nothing matches, the test is only run once.
--test_env =<a 'name=value' assignment with an optional value part> multiple uses are accumulated
Specifies additional environment variables to be injected into the test runner environment. Variables can be either specified by name, in which case its value will be read from the Bazel client environment, or by the name=value pair. This option can be used multiple times to specify several variables. Used only by the 'bazel test' command.
Tags: test_runner
--test_timeout =<a single integer or comma-separated list of 4 integers> default: "-1"
Override the default test timeout values for test timeouts (in secs). If a single positive integer value is specified it will override all categories. If 4 comma-separated integers are specified, they will override the timeouts for short, moderate, long and eternal (in that order). In either form, a value of -1 tells blaze to use its default timeouts for that category.
--tvos_simulator_device =<a string> default: see description
The device to simulate when running an tvOS application in the simulator, eg 'Apple TV 1080p'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.
Tags: test_runner
--tvos_simulator_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
The version of tvOS to run on the simulator when running or testing.
Tags: test_runner
--watchos_simulator_device =<a string> default: see description
The device to simulate when running an watchOS application in the simulator, eg 'Apple Watch - 38mm'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.
Tags: test_runner
--watchos_simulator_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
The version of watchOS to run on the simulator when running or testing.
Tags: test_runner
--[no]zip_undeclared_test_outputs default: "true"
If true, undeclared test outputs will be archived in a zip file.
Tags: test_runner
Options relating to query output and semantics:
--aspect_deps =<off, conservative or precise> default: "conservative"
How to resolve aspect dependencies when the output format is one of {xml,proto,record}. 'off' means no aspect dependencies are resolved, 'conservative' (the default) means all declared aspect dependencies are added regardless of whether they are given the rule class of direct dependencies, 'precise' means that only those aspects are added that are possibly active given the rule class of the direct dependencies. Note that precise mode requires loading other packages to evaluate a single target thus making it slower than the other modes. Also note that even precise mode is not completely precise: the decision whether to compute an aspect is decided in the analysis phase, which is not run during 'bazel query'.
Tags: build_file_semantics
--[no]deduplicate_depsets default: "true"
De-duplicate non-leaf children of a dep_set_of_files in the final proto/textproto/json output. This does not deduplicate depsets that don't share an immediate parent. This does not affect the final effective list of input artifacts of the actions.
Tags: terminal_output
--[no]graph:factored default: "true"
If true, then the graph will be emitted 'factored', ie topologically-equivalent nodes will be merged together and their labels concatenated. This option is only applicable to --output=graph.
Tags: terminal_output
--graph:node_limit =<an integer> default: "512"
The maximum length of the label string for a graph node in the output. Longer labels will be truncated; -1 means no truncation. This option is only applicable to --output=graph.
Tags: terminal_output
--[no]implicit_deps default: "true"
If enabled, implicit dependencies will be included in the dependency graph over which the query operates. An implicit dependency is one that is not explicitly specified in the BUILD file but added by bazel. For cquery, this option controls filtering resolved toolchains.
Tags: build_file_semantics
--[no]include_artifacts default: "true"
Includes names of the action inputs and outputs in the output (potentially large).
Tags: terminal_output
--[no]include_aspects default: "true"
aquery, cquery: whether to include aspect-generated actions in the output. query: no-op (aspects are always followed).
Tags: terminal_output
--[no]include_commandline default: "true"
Includes the content of the action command lines in the output (potentially large).
Tags: terminal_output
--[no]include_file_write_contents default: "false"
Include the file contents for the FileWrite and SourceSymlinkManifest actions (potentially large).
Tags: terminal_output
--[no]include_param_files default: "false"
Include the content of the param files used in the command (potentially large). Note: Enabling this flag will automatically enable the --include_commandline flag.
Tags: terminal_output
--[no]incompatible_display_source_file_location default: "true"
True by default, displays the target of the source file. If true, displays the location of line 1 of source files in location outputs. This flag only exists for migration purposes.
Tags: terminal_output , incompatible_change
--[no]infer_universe_scope default: "false"
If set and --universe_scope is unset, then a value of --universe_scope will be inferred as the list of unique target patterns in the query expression. Note that the --universe_scope value inferred for a query expression that uses universe-scoped functions (eg`allrdeps`) may not be what you want, so you should use this option only if you know what you are doing. See https://bazel.build/reference/query#sky-query for details and examples. If --universe_scope is set, then this option's value is ignored. Note: this option applies only to `query` (ie not `cquery`).
Tags: loading_and_analysis
--[no]line_terminator_null default: "false"
Whether each format is terminated with \0 instead of newline.
Tags: terminal_output
--[no]nodep_deps default: "true"
If enabled, deps from "nodep" attributes will be included in the dependency graph over which the query operates. A common example of a "nodep" attribute is "visibility". Run and parse the output of `info build-language` to learn about all the "nodep" attributes in the build language.
Tags: build_file_semantics
--output =<a string> default: "text"
The format in which the aquery results should be printed. Allowed values for aquery are: text, textproto, proto, jsonproto.
Tags: terminal_output
--[no]proto:default_values default: "true"
If true, attributes whose value is not explicitly specified in the BUILD file are included; otherwise they are omitted. This option is applicable to --output=proto
Tags: terminal_output
--[no]proto:definition_stack default: "false"
Populate the definition_stack proto field, which records for each rule instance the Starlark call stack at the moment the rule's class was defined.
Tags: terminal_output
--[no]proto:flatten_selects default: "true"
If enabled, configurable attributes created by select() are flattened. For list types the flattened representation is a list containing each value of the select map exactly once. Scalar types are flattened to null.
Tags: build_file_semantics
--[no]proto:include_synthetic_attribute_hash default: "false"
Whether or not to calculate and populate the $internal_attr_hash attribute.
Tags: terminal_output
--[no]proto:instantiation_stack default: "false"
Populate the instantiation call stack of each rule. Note that this requires the stack to be present
Tags: terminal_output
--[no]proto:locations default: "true"
Whether to output location information in proto output at all.
Tags: terminal_output
--proto:output_rule_attrs =<comma-separated list of options> default: "all"
Comma separated list of attributes to include in output. Defaults to all attributes. Set to empty string to not output any attribute. This option is applicable to --output=proto.
Tags: terminal_output
--[no]proto:rule_inputs_and_outputs default: "true"
Whether or not to populate the rule_input and rule_output fields.
Tags: terminal_output
--[no]relative_locations default: "false"
If true, the location of BUILD files in xml and proto outputs will be relative. By default, the location output is an absolute path and will not be consistent across machines. You can set this option to true to have a consistent result across machines.
Tags: terminal_output
--[no]skyframe_state default: "false"
Without performing extra analysis, dump the current Action Graph from Skyframe. Note: Specifying a target with --skyframe_state is currently not supported. This flag is only available with --output=proto or --output=textproto.
Tags: terminal_output
--[no]tool_deps default: "true"
Query: If disabled, dependencies on 'host configuration' or 'execution' targets will not be included in the dependency graph over which the query operates. A 'host configuration' dependency edge, such as the one from any 'proto_library' rule to the Protocol Compiler, usually points to a tool executed during the build rather than a part of the same 'target' program. Cquery: If disabled, filters out all configured targets which cross a host or execution transition from the top-level target that discovered this configured target. That means if the top-level target is in the target configuration, only configured targets also in the target configuration will be returned. If the top-level target is in the host configuration, only host configured targets will be returned. This option will NOT exclude resolved toolchains.
Tags: build_file_semantics
--universe_scope =<comma-separated list of options> default: ""
A comma-separated set of target patterns (additive and subtractive). The query may be performed in the universe defined by the transitive closure of the specified targets. This option is used for the query and cquery commands. For cquery, the input to this option is the targets all answers are built under and so this option may affect configurations and transitions. If this option is not specified, the top-level targets are assumed to be the targets parsed from the query expression. Note: For cquery, not specifying this option may cause the build to break if targets parsed from the query expression are not buildable with top-level options.
Tags: loading_and_analysis
Options that trigger optimizations of the build time:
--[no]collapse_duplicate_defines default: "false"
When enabled, redundant --defines will be removed early in the build. This avoids unnecessary loss of the analysis cache for certain types of equivalent builds.
Tags: loading_and_analysis , loses_incremental_state
--[no]experimental_filter_library_jar_with_program_jar default: "false"
Filter the ProGuard ProgramJar to remove any classes also present in the LibraryJar.
Tags: action_command_lines
--[no]experimental_inmemory_dotd_files default: "false"
If enabled, C++ .d files will be passed through in memory directly from the remote build nodes instead of being written to disk.
Tags: loading_and_analysis , execution , affects_outputs , experimental
--[no]experimental_inmemory_jdeps_files default: "false"
If enabled, the dependency (.jdeps) files generated from Java compilations will be passed through in memory directly from the remote build nodes instead of being written to disk.
Tags: loading_and_analysis , execution , affects_outputs , experimental
--[no]experimental_objc_include_scanning default: "false"
Whether to perform include scanning for objective C/C++.
Tags: loading_and_analysis , execution , changes_inputs
--[no]experimental_parse_headers_skipped_if_corresponding_srcs_found default: "false"
If enabled, the parse_headers feature does not create a separate header compile action if a source with the same basename is found in the same target.
Tags: loading_and_analysis , affects_outputs
--[no]experimental_retain_test_configuration_across_testonly default: "false"
When enabled, --trim_test_configuration will not trim the test configuration for rules marked testonly=1. This is meant to reduce action conflict issues when non-test rules depend on cc_test rules. No effect if --trim_test_configuration is false.
Tags: loading_and_analysis , loses_incremental_state
--[no]experimental_starlark_cc_import default: "false"
If enabled, the Starlark version of cc_import can be used.
Tags: loading_and_analysis , experimental
--[no]experimental_unsupported_and_brittle_include_scanning default: "false"
Whether to narrow inputs to C/C++ compilation by parsing #include lines from input files. This can improve performance and incrementality by decreasing the size of compilation input trees. However, it can also break builds because the include scanner does not fully implement C preprocessor semantics. In particular, it does not understand dynamic #include directives and ignores preprocessor conditional logic. Use at your own risk. Any issues relating to this flag that are filed will be closed.
Tags: loading_and_analysis , execution , changes_inputs
--[no]incremental_dexing default: "true"
Does most of the work for dexing separately for each Jar file.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]objc_use_dotd_pruning default: "true"
If set, .d files emitted by clang will be used to prune the set of inputs passed into objc compiles.
Tags: changes_inputs , loading_and_analysis
--[no]process_headers_in_dependencies default: "false"
When building a target //a:a, process headers in all targets that //a:a depends on (if header processing is enabled for the toolchain).
Tags: execution
--[no]trim_test_configuration default: "true"
When enabled, test-related options will be cleared below the top level of the build. When this flag is active, tests cannot be built as dependencies of non-test rules, but changes to test-related options will not cause non-test rules to be re-analyzed.
Tags: loading_and_analysis , loses_incremental_state
--[no]use_singlejar_apkbuilder default: "true"
This option is a deprecated. It is now a no-op and will be removed soon.
Tags: loading_and_analysis
Options that affect the verbosity, format or location of logging:
--toolchain_resolution_debug =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths> default: "-.*"
Print debug information during toolchain resolution. The flag takes a regex, which is checked against toolchain types and specific targets to see which to debug. Multiple regexes may be separated by commas, and then each regex is checked separately. Note: The output of this flag is very complex and will likely only be useful to experts in toolchain resolution.
Tags: terminal_output
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--flag_alias =<a 'name=value' flag alias> multiple uses are accumulated
Sets a shorthand name for a Starlark flag. It takes a single key-value pair in the form "<key>=<value>" as an argument.
Tags: changes_inputs
--[no]incompatible_default_to_explicit_init_py default: "false"
This flag changes the default behavior so that __init__.py files are no longer automatically created in the runfiles of Python targets. Precisely, when a py_binary or py_test target has legacy_create_init set to "auto" (the default), it is treated as false if and only if this flag is set. See https://github.com/bazelbuild/bazel/issues/10076.
Tags: affects_outputs , incompatible_change
--[no]incompatible_py2_outputs_are_suffixed default: "true"
If true, targets built in the Python 2 configuration will appear under an output root that includes the suffix '-py2', while targets built for Python 3 will appear in a root with no Python-related suffix. This means that the `bazel-bin` convenience symlink will point to Python 3 targets rather than Python 2. If you enable this option it is also recommended to enable `--incompatible_py3_is_default`.
Tags: affects_outputs , incompatible_change
--[no]incompatible_py3_is_default default: "true"
If true, `py_binary` and `py_test` targets that do not set their `python_version` (or `default_python_version`) attribute will default to PY3 rather than to PY2. If you set this flag it is also recommended to set `--incompatible_py2_outputs_are_suffixed`.
Tags: loading_and_analysis , affects_outputs , incompatible_change
--[no]incompatible_use_python_toolchains default: "true"
If set to true, executable native Python rules will use the Python runtime specified by the Python toolchain, rather than the runtime given by legacy flags like --python_top.
Tags: loading_and_analysis , incompatible_change
--python_version =<PY2 or PY3> default: see description
The Python major version mode, either `PY2` or `PY3`. Note that this is overridden by `py_binary` and `py_test` targets (even if they don't explicitly specify a version) so there is usually not much reason to supply this flag.
Tags: loading_and_analysis , affects_outputs , explicit_in_output_path
Miscellaneous options, not otherwise categorized.:
--[no]cache_test_results [ -t ] default: "auto"
If set to 'auto', Bazel reruns a test if and only if: (1) Bazel detects changes in the test or its dependencies, (2) the test is marked as external, (3) multiple test runs were requested with --runs_per_test, or(4) the test previously failed. If set to 'yes', Bazel caches all test results except for tests marked as external. If set to 'no', Bazel does not cache any test results.
--[no]experimental_cancel_concurrent_tests default: "false"
If true, then Blaze will cancel concurrently running tests on the first successful run. This is only useful in combination with --runs_per_test_detects_flakes.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_fetch_all_coverage_outputs default: "false"
If true, then Bazel fetches the entire coverage data directory for each test during a coverage run.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_generate_llvm_lcov default: "false"
If true, coverage for clang will generate an LCOV report.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_j2objc_header_map default: "true"
Whether to generate J2ObjC header map in parallel of J2ObjC transpilation.
--[no]experimental_j2objc_shorter_header_path default: "false"
Whether to generate with shorter header path (uses "_ios" instead of "_j2objc").
Tags: affects_outputs
--experimental_java_classpath =<off, javabuilder or bazel> default: "javabuilder"
Enables reduced classpaths for Java compilations.
--[no]experimental_limit_android_lint_to_android_constrained_java default: "false"
Limit --experimental_run_android_lint_on_java_rules to Android-compatible libraries.
Tags: affects_outputs
--[no]experimental_run_android_lint_on_java_rules default: "false"
Whether to validate java_* sources.
Tags: affects_outputs
--[no]explicit_java_test_deps default: "false"
Explicitly specify a dependency to JUnit or Hamcrest in a java_test instead of accidentally obtaining from the TestRunner's deps. Only works for bazel right now.
--host_java_launcher =<a build target label> default: see description
The Java launcher used by tools that are executed during a build.
--host_javacopt =<a string> multiple uses are accumulated
Additional options to pass to javac when building tools that are executed during a build.
--host_jvmopt =<a string> multiple uses are accumulated
Additional options to pass to the Java VM when building tools that are executed during the build. These options will get added to the VM startup options of each java_binary target.
--[no]incompatible_exclusive_test_sandboxed default: "false"
If true, exclusive tests will run with sandboxed strategy. Add 'local' tag to force an exclusive test run locally
Tags: incompatible_change
--[no]incompatible_strict_action_env default: "false"
If true, Bazel uses an environment with a static value for PATH and does not inherit LD_LIBRARY_PATH. Use --action_env=ENV_VARIABLE if you want to inherit specific environment variables from the client, but note that doing so can prevent cross-user caching if a shared cache is used.
Tags: loading_and_analysis , incompatible_change
--j2objc_translation_flags =<comma-separated list of options> multiple uses are accumulated
Additional options to pass to the J2ObjC tool.
--java_debug
Causes the Java virtual machine of a java test to wait for a connection from a JDWP-compliant debugger (such as jdb) before starting the test. Implies -test_output=streamed.
Expands to:
--test_arg=--wrapper_script_flag=--debug
--test_output=streamed
--test_strategy=exclusive
--test_timeout=9999
--nocache_test_results
--[no]java_deps default: "true"
Generate dependency information (for now, compile-time classpath) per Java target.
--[no]java_header_compilation default: "true"
Compile ijars directly from source.
--java_language_version =<a string> default: "8"
The Java language version
--java_launcher =<a build target label> default: see description
The Java launcher to use when building Java binaries. If this flag is set to the empty string, the JDK launcher is used. The "launcher" attribute overrides this flag.
--java_runtime_version =<a string> default: "local_jdk"
The Java runtime version
--javacopt =<a string> multiple uses are accumulated
Additional options to pass to javac.
--jvmopt =<a string> multiple uses are accumulated
Additional options to pass to the Java VM. These options will get added to the VM startup options of each java_binary target.
--legacy_main_dex_list_generator =<a build target label> default: see description
Specifies a binary to use to generate the list of classes that must be in the main dex when compiling legacy multidex.
--plugin =<a build target label> multiple uses are accumulated
Plugins to use in the build. Currently works with java_plugin.
--proguard_top =<a build target label> default: see description
Specifies which version of ProGuard to use for code removal when building a Java binary.
--proto_compiler =<a build target label> default: "@com_google_protobuf//:protoc"
The label of the proto-compiler.
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_cc =<a build target label> default: "@com_google_protobuf//:cc_toolchain"
Label of proto_lang_toolchain() which describes how to compile C++ protos
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_j2objc =<a build target label> default: "@bazel_tools//tools/j2objc:j2objc_proto_toolchain"
Label of proto_lang_toolchain() which describes how to compile j2objc protos
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_java =<a build target label> default: "@com_google_protobuf//:java_toolchain"
Label of proto_lang_toolchain() which describes how to compile Java protos
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_javalite =<a build target label> default: "@com_google_protobuf//:javalite_toolchain"
Label of proto_lang_toolchain() which describes how to compile JavaLite protos
Tags: affects_outputs , loading_and_analysis
--protocopt =<a string> multiple uses are accumulated
Additional options to pass to the protobuf compiler.
Tags: affects_outputs
--[no]runs_per_test_detects_flakes default: "false"
If true, any shard in which at least one run/attempt passes and at least one run/attempt fails gets a FLAKY status.
--shell_executable =<a path> default: see description
Absolute path to the shell executable for Bazel to use. If this is unset, but the BAZEL_SH environment variable is set on the first Bazel invocation (that starts up a Bazel server), Bazel uses that. If neither is set, Bazel uses a hard-coded default path depending on the operating system it runs on (Windows: c:/tools/msys64/usr/bin/bash.exe, FreeBSD: /usr/local/bin/bash, all others: /bin/bash). Note that using a shell that is not compatible with bash may lead to build failures or runtime failures of the generated binaries.
Tags: loading_and_analysis
--test_arg =<a string> multiple uses are accumulated
Specifies additional options and arguments that should be passed to the test executable. Can be used multiple times to specify several arguments. If multiple tests are executed, each of them will receive identical arguments. Used only by the 'bazel test' command.
--test_filter =<a string> default: see description
Specifies a filter to forward to the test framework. Used to limit the tests run. Note that this does not affect which targets are built.
--test_result_expiration =<an integer> default: "-1"
This option is deprecated and has no effect.
--[no]test_runner_fail_fast default: "false"
Forwards fail fast option to the test runner. The test runner should stop execution upon first failure.
--test_sharding_strategy =<explicit or disabled> default: "explicit"
Specify strategy for test sharding: 'explicit' to only use sharding if the 'shard_count' BUILD attribute is present. 'disabled' to never use test sharding.
--tool_java_language_version =<a string> default: "8"
The Java language version used to execute the tools that are needed during a build
--tool_java_runtime_version =<a string> default: "remotejdk_11"
The Java runtime version used to execute tools during the build
--[no]use_ijars default: "true"
If enabled, this option causes Java compilation to use interface jars. This will result in faster incremental compilation, but error messages can be different.

Build Options

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that control build execution:
--[no]check_up_to_date default: "false"
Don't perform the build, just check if it is up-to-date. If all targets are up-to-date, the build completes successfully. If any step needs to be executed an error is reported and the build fails.
Tags: execution
--[no]experimental_delay_virtual_input_materialization default: "false"
If set to true, creates virtual inputs (like params files) only inside the sandbox, not in the execroot, which fixes a race condition when using the dynamic scheduler. This flag exists purely to support rolling this bug fix out.
Tags: execution
--experimental_docker_image =<a string> default: ""
Specify a Docker image name (eg "ubuntu:latest") that should be used to execute a sandboxed action when using the docker strategy and the action itself doesn't already have a container-image attribute in its remote_execution_properties in the platform description. The value of this flag is passed verbatim to 'docker run', so it supports the same syntax and mechanisms as Docker itself.
Tags: execution
--[no]experimental_docker_privileged default: "false"
If enabled, Bazel will pass the --privileged flag to 'docker run' when running actions. This might be required by your build, but it might also result in reduced hermeticity.
Tags: execution
--[no]experimental_docker_use_customized_images default: "true"
If enabled, injects the uid and gid of the current user into the Docker image before using it. This is required if your build / tests depend on the user having a name and home directory inside the container. This is on by default, but you can disable it in case the automatic image customization feature doesn't work in your case or you know that you don't need it.
Tags: execution
--[no]experimental_docker_verbose default: "false"
If enabled, Bazel will print more verbose messages about the Docker sandbox strategy.
Tags: execution
--[no]experimental_enable_docker_sandbox default: "false"
Enable Docker-based sandboxing. This option has no effect if Docker is not installed.
Tags: execution
--[no]experimental_reuse_sandbox_directories default: "false"
If set to true, directories used by sandboxed non-worker execution may be reused to avoid unnecessary setup costs.
Tags: execution
--experimental_sandbox_async_tree_delete_idle_threads =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> default: "0"
If 0, delete sandbox trees as soon as an action completes (causing completion of the action to be delayed). If greater than zero, execute the deletion of such threes on an asynchronous thread pool that has size 1 when the build is running and grows to the size specified by this flag when the server is idle.
Tags: execution
If true, maps the targets of symbolic links specified as action inputs into the sandbox. This feature exists purely to workaround buggy rules that do not do this on their own and should be removed once all such rules are fixed.
--experimental_sandboxfs_path =<a string> default: "sandboxfs"
Path to the sandboxfs binary to use when --experimental_use_sandboxfs is true. If a bare name, use the first binary of that name found in the PATH.
--[no]experimental_split_xml_generation default: "true"
If this flag is set, and a test action does not generate a test.xml file, then Bazel uses a separate action to generate a dummy test.xml file containing the test log. Otherwise, Bazel generates a test.xml as part of the test action.
Tags: execution
--[no]experimental_use_hermetic_linux_sandbox default: "false"
If set to true, do not mount root, only mount whats provided with sandbox_add_mount_pair. Input files will be hardlinked to the sandbox instead of symlinked to from the sandbox. If action input files are located on a filesystem different from the sandbox, then the input files will be copied instead.
Tags: execution
--[no]experimental_use_sandboxfs default: "false"
Use sandboxfs to create the actions' execroot directories instead of building a symlink tree. If "yes", the binary provided by --experimental_sandboxfs_path must be valid and correspond to a supported version of sandboxfs. If "auto", the binary may be missing or not compatible.
--[no]experimental_use_windows_sandbox default: "false"
Use Windows sandbox to run actions. If "yes", the binary provided by --experimental_windows_sandbox_path must be valid and correspond to a supported version of sandboxfs. If "auto", the binary may be missing or not compatible.
--experimental_windows_sandbox_path =<a string> default: "BazelSandbox.exe"
Path to the Windows sandbox binary to use when --experimental_use_windows_sandbox is true. If a bare name, use the first binary of that name found in the PATH.
--genrule_strategy =<comma-separated list of options> default: ""
Specify how to execute genrules. This flag will be phased out. Instead, use --spawn_strategy=<value> to control all actions or --strategy=Genrule=<value> to control genrules only.
Tags: execution
--[no]incompatible_legacy_local_fallback default: "true"
If set to true, enables the legacy implicit fallback from sandboxed to local strategy. This flag will eventually default to false and then become a no-op. Use --strategy, --spawn_strategy, or --dynamic_local_strategy to configure fallbacks instead.
Tags: execution , incompatible_change
If set to true, Bazel will represent symlinks in action outputs in the remote caching/execution protocol as such. The current behavior is for remote caches/executors to follow symlinks and represent them as files. See #6631 for details.
Tags: execution , incompatible_change
--jobs =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> [ -j ] default: "auto"
The number of concurrent jobs to run. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". Values must be between 1 and 5000. Values above 2500 may cause memory issues. "auto" calculates a reasonable default based on host resources.
Tags: host_machine_resource_optimizations , execution
--[no]keep_going [ -k ] default: "false"
Continue as much as possible after an error. While the target that failed and those that depend on it cannot be analyzed, other prerequisites of these targets can be.
Tags: eagerness_to_exit
--loading_phase_threads =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> default: "auto"
Number of parallel threads to use for the loading/analysis phase.Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". "auto" sets a reasonable default based on host resources. Must be at least 1.
Tags: bazel_internal_configuration
If true, upload action symlink outputs to the remote cache. If this option is not enabled, cachable actions that output symlinks will fail.
Tags: execution
--spawn_strategy =<comma-separated list of options> default: ""
Specify how spawn actions are executed by default. Accepts a comma-separated list of strategies from highest to lowest priority. For each action Bazel picks the strategy with the highest priority that can execute the action. The default value is "remote,worker,sandboxed,local". See https://blog.bazel.build/2019/06/19/list-strategy.html for details.
Tags: execution
--strategy =<a '[name=]value1[,..,valueN]' assignment> multiple uses are accumulated
Specify how to distribute compilation of other spawn actions. Accepts a comma-separated list of strategies from highest to lowest priority. For each action Bazel picks the strategy with the highest priority that can execute the action. The default value is "remote,worker,sandboxed,local". This flag overrides the values set by --spawn_strategy (and --genrule_strategy if used with mnemonic Genrule). See https://blog.bazel.build/2019/06/19/list-strategy.html for details.
Tags: execution
--strategy_regexp =<a '<RegexFilter>=value[,value]' assignment> multiple uses are accumulated
Override which spawn strategy should be used to execute spawn actions that have descriptions matching a certain regex_filter. See --per_file_copt for details onregex_filter matching. The first regex_filter that matches the description is used. This option overrides other flags for specifying strategy. Example: --strategy_regexp=//foo.*\.cc,-//foo/bar=local means to run actions using local strategy if their descriptions match //foo.*.cc but not //foo/bar. Example: --strategy_regexp='Compiling.*/bar=local --strategy_regexp=Compiling=sandboxed will run 'Compiling //foo/bar/baz' with the 'local' strategy, but reversing the order would run it with 'sandboxed'.
Tags: execution
Options that configure the toolchain used for action execution:
--[no]incompatible_disable_runtimes_filegroups default: "false"
Deprecated no-op.
Tags: action_command_lines , loading_and_analysis , deprecated , incompatible_change
--[no]incompatible_dont_emit_static_libgcc default: "true"
Deprecated no-op.
Tags: action_command_lines , loading_and_analysis , deprecated , incompatible_change
Deprecated no-op.
Tags: action_command_lines , loading_and_analysis , deprecated , incompatible_change
Options that control the output of the command:
--[no]build default: "true"
Execute the build; this is the usual behaviour. Specifying --nobuild causes the build to stop before executing the build actions, returning zero iff the package loading and analysis phases completed successfully; this mode is useful for testing those phases.
Tags: execution , affects_outputs
--[no]experimental_run_validations default: "true"
Use --run_validations instead.
Tags: execution , affects_outputs
--[no]experimental_use_validation_aspect default: "false"
Whether to run validation actions using aspect (for parallelism with tests).
Tags: execution , affects_outputs
--output_groups =<comma-separated list of options> multiple uses are accumulated
A list of comma-separated output group names, each of which optionally prefixed by a + or a -. A group prefixed by + is added to the default set of output groups, while a group prefixed by - is removed from the default set. If at least one group is not prefixed, the default set of output groups is omitted. For example, --output_groups=+foo,+bar builds the union of the default set, foo, and bar, while --output_groups=foo,bar overrides the default set such that only foo and bar are built.
Tags: execution , affects_outputs
--[no]run_validations default: "true"
Whether to run validation actions as part of the build. See https://bazel.build/rules/rules#validation_actions
Tags: execution , affects_outputs
Options that let the user configure the intended output, affecting its value, as opposed to its existence:
--aspects =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of aspects to be applied to top-level targets. In the list, if aspect some_aspect specifies required aspect providers via required_aspect_providers, some_aspect will run after every aspect that was mentioned before it in the aspects list whose advertised providers satisfy some_aspect required aspect providers. Moreover, some_aspect will run after all its required aspects specified by requires attribute. some_aspect will then have access to the values of those aspects' providers. <bzl-file-label>%<aspect_name>, for example '//tools:my_def.bzl%my_aspect', where 'my_aspect' is a top-level value from a file tools/my_def.bzl
--bep_maximum_open_remote_upload_files =<an integer> default: "-1"
Maximum number of open files allowed during BEP artifact upload.
Tags: affects_outputs
This flag controls how the convenience symlinks (the symlinks that appear in the workspace after the build) will be managed. Possible values: normal (default): Each kind of convenience symlink will be created or deleted, as determined by the build. clean: All symlinks will be unconditionally deleted. ignore: Symlinks will be left alone. log_only: Generate log messages as if 'normal' were passed, but don't actually perform any filesystem operations (useful for tools). Note that only symlinks whose names are generated by the current value of --symlink_prefix can be affected; if the prefix changes, any pre-existing symlinks will be left alone.
Tags: affects_outputs
This flag controls whether or not we will post the build eventConvenienceSymlinksIdentified to the BuildEventProtocol. If the value is true, the BuildEventProtocol will have an entry for convenienceSymlinksIdentified, listing all of the convenience symlinks created in your workspace. If false, then the convenienceSymlinksIdentified entry in the BuildEventProtocol will be empty.
Tags: affects_outputs
--experimental_multi_cpu =<comma-separated list of options> multiple uses are accumulated
This flag allows specifying multiple target CPUs. If this is specified, the --cpu option is ignored.
Tags: affects_outputs , experimental
--remote_download_minimal
Does not download any remote build outputs to the local machine. This flag is a shortcut for three flags: --experimental_inmemory_jdeps_files, --experimental_inmemory_dotd_files and --remote_download_outputs=minimal.
Expands to:
--nobuild_runfile_links
--experimental_inmemory_jdeps_files
--experimental_inmemory_dotd_files
--remote_download_outputs=minimal

Tags: affects_outputs
--remote_download_outputs =<all, minimal or toplevel> default: "all"
If set to 'minimal' doesn't download any remote build outputs to the local machine, except the ones required by local actions. If set to 'toplevel' behaves like'minimal' except that it also downloads outputs of top level targets to the local machine. Both options can significantly reduce build times if network bandwidth is a bottleneck.
Tags: affects_outputs
Instead of downloading remote build outputs to the local machine, create symbolic links. The target of the symbolic links can be specified in the form of a template string. This template string may contain {hash} and {size_bytes} that expand to the hash of the object and the size in bytes, respectively. These symbolic links may, for example, point to a FUSE file system that loads objects from the CAS on demand.
Tags: affects_outputs
--remote_download_toplevel
Only downloads remote outputs of top level targets to the local machine. This flag is a shortcut for three flags: --experimental_inmemory_jdeps_files, --experimental_inmemory_dotd_files and --remote_download_outputs=toplevel.
Expands to:
--experimental_inmemory_jdeps_files
--experimental_inmemory_dotd_files
--remote_download_outputs=toplevel

Tags: affects_outputs
The prefix that is prepended to any of the convenience symlinks that are created after a build. If omitted, the default value is the name of the build tool followed by a hyphen. If '/' is passed, then no symlinks are created and no warning is emitted. Warning: the special functionality for '/' will be deprecated soon; use --experimental_convenience_symlinks=ignore instead.
Tags: affects_outputs
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
--[no]incompatible_config_setting_private_default_visibility default: "false"
If incompatible_enforce_config_setting_visibility=false, this is a noop. Else, if this flag is false, any config_setting without an explicit visibility attribute is //visibility:public. If this flag is true, config_setting follows the same visibility logic as all other rules. See https://github.com/bazelbuild/bazel/issues/12933.
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enforce_config_setting_visibility default: "false"
If true, enforce config_setting visibility restrictions. If false, every config_setting is visible to every target. See https://github.com/bazelbuild/bazel/issues/12932.
Tags: loading_and_analysis , incompatible_change
Options that govern the behavior of the test environment or test runner:
--[no]check_tests_up_to_date default: "false"
Don't run tests, just check if they are up-to-date. If all tests results are up-to-date, the testing completes successfully. If any test needs to be built or executed, an error is reported and the testing fails. This option implies --check_up_to_date behavior.
Tags: execution
--flaky_test_attempts =<a positive integer, the string "default", or test_regex@attempts. This flag may be passed more than once> multiple uses are accumulated
Each test will be retried up to the specified number of times in case of any test failure. Tests that required more than one attempt to pass are marked as 'FLAKY' in the test summary. Normally the value specified is just an integer or the string 'default'. If an integer, then all tests will be run up to N times. If 'default', then only a single test attempt will be made for regular tests and three for tests marked explicitly as flaky by their rule (flaky=1 attribute). Alternate syntax: regex_filter@flaky_test_attempts. Where flaky_test_attempts is as above and regex_filter stands for a list of include and exclude regular expression patterns (Also see --runs_per_test). Example: --flaky_test_attempts=//foo/.*,-//foo/bar/.*@3 deflakes all tests in //foo/ except those under foo/bar three times. This option can be passed multiple times. The most recently passed argument that matches takes precedence. If nothing matches, behavior is as if 'default' above.
Tags: execution
--local_test_jobs =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> default: "auto"
The max number of local test jobs to run concurrently. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 0 means local resources will limit the number of local test jobs to run concurrently instead. Setting this greater than the value for --jobs is ineffectual.
Tags: execution
--[no]test_keep_going default: "true"
When disabled, any non-passing test will cause the entire build to stop. By default all tests are run, even if some do not pass.
Tags: execution
--test_strategy =<a string> default: ""
Specifies which strategy to use when running tests.
Tags: execution
--test_tmpdir =<a path> default: see description
Specifies the base temporary directory for 'bazel test' to use.
Options that affect the verbosity, format or location of logging:
--[no]announce default: "false"
অবচয়। No-op.
Tags: affects_outputs
--[no]experimental_bep_target_summary default: "false"
Whether to publish TargetSummary events.
--[no]experimental_build_event_expand_filesets default: "false"
If true, expand Filesets in the BEP when presenting output files.
Tags: affects_outputs
If true, fully resolve relative Fileset symlinks in the BEP when presenting output files. Requires --experimental_build_event_expand_filesets.
Tags: affects_outputs
--experimental_build_event_upload_strategy =<a string> default: see description
Selects how to upload artifacts referenced in the build event protocol.
Tags: affects_outputs
--[no]experimental_materialize_param_files_directly default: "false"
If materializing param files, do so with direct writes to disk.
Tags: execution
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
--experimental_repository_resolved_file =<a string> default: ""
If non-empty, write a Starlark value with the resolved information of all Starlark repository rules that were executed.
Tags: affects_outputs
--[no]experimental_stream_log_file_uploads default: "false"
Stream log file uploads directly to the remote storage rather than writing them to disk.
Tags: affects_outputs
--explain =<a path> default: see description
Causes the build system to explain each executed step of the build. The explanation is written to the specified log file.
Tags: affects_outputs
--[no]legacy_important_outputs default: "true"
Use this to suppress generation of the legacy important_outputs field in the TargetComplete event. important_outputs are required for Bazel to ResultStore integration.
Tags: affects_outputs
--[no]materialize_param_files default: "false"
Writes intermediate parameter files to output tree even when using remote action execution. Useful when debugging actions. This is implied by --subcommands and --verbose_failures.
Tags: execution
--max_config_changes_to_show =<an integer> default: "3"
When discarding the analysis cache due to a change in the build options, displays up to the given number of changed option names. If the number given is -1, all changed options will be displayed.
Tags: terminal_output
--max_test_output_bytes =<an integer> default: "-1"
Specifies maximum per-test-log size that can be emitted when --test_output is 'errors' or 'all'. Useful for avoiding overwhelming the output with excessively noisy test output. The test header is included in the log size. Negative values imply no limit. Output is all or nothing.
Tags: test_runner , terminal_output , execution
--output_filter =<a valid Java regular expression> default: see description
Only shows warnings for rules with a name matching the provided regular expression.
Tags: affects_outputs
--progress_report_interval =<an integer in 0-3600 range> default: "0"
The number of seconds to wait between two reports on still running jobs. The default value 0 means to use the default 10:30:60 incremental algorithm.
Tags: affects_outputs
--remote_print_execution_messages =<failure, success or all> default: "failure"
Choose when to print remote execution messages. Valid values are `failure`, to print only on failures, `success` to print only on successes and `all` to print always.
Tags: terminal_output
--show_result =<an integer> default: "1"
Show the results of the build. For each target, state whether or not it was brought up-to-date, and if so, a list of output files that were built. The printed files are convenient strings for copy+pasting to the shell, to execute them. This option requires an integer argument, which is the threshold number of targets above which result information is not printed. Thus zero causes suppression of the message and MAX_INT causes printing of the result to occur always. The default is one.
Tags: affects_outputs
--[no]subcommands [ -s ] default: "false"
Display the subcommands executed during a build. Related flags: --execution_log_json_file, --execution_log_binary_file (for logging subcommands to a file in a tool-friendly format).
Tags: terminal_output
--test_output =<summary, errors, all or streamed> default: "summary"
Specifies desired output mode. Valid values are 'summary' to output only test status summary, 'errors' to also print test logs for failed tests, 'all' to print logs for all tests and 'streamed' to output logs for all tests in real time (this will force tests to be executed locally one at a time regardless of --test_strategy value).
Tags: test_runner , terminal_output , execution
--test_summary =<short, terse, detailed, none or testcase> default: "short"
Specifies the desired format of the test summary. Valid values are 'short' to print information only about tests executed, 'terse', to print information only about unsuccessful tests that were run, 'detailed' to print detailed information about failed test cases, 'testcase' to print summary in test case resolution, do not print detailed information about failed test cases and 'none' to omit the summary.
Tags: terminal_output
--[no]verbose_explanations default: "false"
Increases the verbosity of the explanations issued if --explain is enabled. Has no effect if --explain is not enabled.
Tags: affects_outputs
--[no]verbose_failures default: "false"
If a command fails, print out the full command line.
Tags: terminal_output
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--aspects_parameters =<a 'name=value' assignment> multiple uses are accumulated
Specifies the values of the command-line aspects parameters. Each parameter value is specified via <param_name>=<param_value>, for example 'my_param=my_val' where 'my_param' is a parameter of some aspect in --aspects list or required by an aspect in the list. This option can be used multiple times. However, it is not allowed to assign values to the same parameter more than once.
Tags: loading_and_analysis
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
--target_pattern_file =<a string> default: ""
If set, build will read patterns from the file named here, rather than on the command line. It is an error to specify a file here as well as command-line patterns.
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
--[no]experimental_guard_against_concurrent_changes default: "false"
Turn this off to disable checking the ctime of input files of an action before uploading it to a remote cache. There may be cases where the Linux kernel delays writing of files, which could cause false positives.
--[no]experimental_remote_cache_async default: "false"
If true, remote cache I/O will happen in the background instead of taking place as the part of a spawn.
--[no]experimental_remote_cache_compression default: "false"
If enabled, compress/decompress cache blobs with zstd.
--experimental_remote_capture_corrupted_outputs =<a path> default: see description
A path to a directory where the corrupted outputs will be captured to.
--experimental_remote_downloader =<a string> default: see description
A Remote Asset API endpoint URI, to be used as a remote download proxy. The supported schemas are grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. See: https://github.com/bazelbuild/remote-apis/blob/master/build/bazel/remote/asset/v1/remote_asset.proto
--[no]experimental_remote_execution_keepalive default: "false"
Whether to use keepalive for remote execution calls.
--experimental_remote_grpc_log =<a path> default: see description
If specified, a path to a file to log gRPC call related details. This log consists of a sequence of serialized com.google.devtools.build.lib.remote.logging.RemoteExecutionLog.LogEntry protobufs with each message prefixed by a varint denoting the size of the following serialized protobuf message, as performed by the method LogEntry.writeDelimitedTo(OutputStream).
--[no]experimental_remote_merkle_tree_cache default: "false"
If set to true, Merkle tree calculations will be memoized to improve the remote cache hit checking speed. The memory foot print of the cache is controlled by --experimental_remote_merkle_tree_cache_size.
--experimental_remote_merkle_tree_cache_size =<a long integer> default: "1000"
The number of Merkle trees to memoize to improve the remote cache hit checking speed. Even though the cache is automatically pruned according to Java's handling of soft references, out-of-memory errors can occur if set too high. If set to 0 the cache size is unlimited. Optimal value varies depending on project's size. Default to 1000.
--[no]incompatible_remote_build_event_upload_respect_no_cache default: "false"
If set to true, outputs referenced by BEP are not uploaded to remote cache if the generating action cannot be cached remotely.
--[no]incompatible_remote_output_paths_relative_to_input_root default: "false"
If set to true, output paths are relative to input root instead of working directory.
Tags: incompatible_change
--[no]incompatible_remote_results_ignore_disk default: "false"
If set to true, --noremote_upload_local_results and --noremote_accept_cached will not apply to the disk cache. If a combined cache is used: --noremote_upload_local_results will cause results to be written to the disk cache, but not uploaded to the remote cache. --noremote_accept_cached will result in Bazel checking for results in the disk cache, but not in the remote cache. no-remote-exec actions can hit the disk cache. See #8216 for details.
Tags: incompatible_change
--[no]remote_accept_cached default: "true"
Whether to accept remotely cached action results.
--remote_bytestream_uri_prefix =<a string> default: see description
The hostname and instance name to be used in bytestream:// URIs that are written into build event streams. This option can be set when builds are performed using a proxy, which causes the values of --remote_executor and --remote_instance_name to no longer correspond to the canonical name of the remote execution service. When not set, it will default to "${hostname}/${instance_name}".
--remote_cache =<a string> default: see description
A URI of a caching endpoint. The supported schemas are http, https, grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. Specify grpc://, http:// or unix: schema to disable TLS. See https://dbaze.build/docs/remote-caching
--remote_cache_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in cache requests: --remote_cache_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_default_exec_properties =<a 'name=value' assignment> multiple uses are accumulated
Set the default exec properties to be used as the remote execution platform if an execution platform does not already set exec_properties.
Tags: affects_outputs
--remote_default_platform_properties =<a string> default: ""
Set the default platform properties to be set for the remote execution API, if the execution platform does not already set remote_execution_properties. This value will also be used if the host platform is selected as the execution platform for remote execution.
--remote_downloader_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in remote downloader requests: --remote_downloader_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_exec_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in execution requests: --remote_exec_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_execution_priority =<an integer> default: "0"
The relative priority of actions to be executed remotely. The semantics of the particular priority values are server-dependent.
--remote_executor =<a string> default: see description
HOST or HOST:PORT of a remote execution endpoint. The supported schemas are grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. Specify grpc:// or unix: schema to disable TLS.
--remote_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in requests: --remote_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_instance_name =<a string> default: ""
Value to pass as instance_name in the remote execution API.
--[no]remote_local_fallback default: "false"
Whether to fall back to standalone local execution strategy if remote execution fails.
--remote_local_fallback_strategy =<a string> default: "local"
No-op, deprecated. See https://github.com/bazelbuild/bazel/issues/7480 for details.
--remote_max_connections =<an integer> default: "100"
Limit the max number of concurrent connections to remote cache/executor. By default the value is 100. Setting this to 0 means no limitation. For HTTP remote cache, one TCP connection could handle one request at one time, so Bazel could make up to --remote_max_connections concurrent requests. For gRPC remote cache/executor, one gRPC channel could usually handle 100+ concurrent requests, so Bazel could make around `--remote_max_connections * 100` concurrent requests.
Tags: host_machine_resource_optimizations
--remote_proxy =<a string> default: see description
Connect to the remote cache through a proxy. Currently this flag can only be used to configure a Unix domain socket (unix:/path/to/socket).
--remote_result_cache_priority =<an integer> default: "0"
The relative priority of remote actions to be stored in remote cache. The semantics of the particular priority values are server-dependent.
--remote_retries =<an integer> default: "5"
The maximum number of attempts to retry a transient error. If set to 0, retries are disabled.
--remote_timeout =<An immutable length of time.> default: "60s"
The maximum amount of time to wait for remote execution and cache calls. For the REST cache, this is both the connect and the read timeout. Following units can be used: Days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms). If the unit is omitted, the value is interpreted as seconds.
--[no]remote_upload_local_results default: "true"
Whether to upload locally executed action results to the remote cache.
--[no]remote_verify_downloads default: "true"
If set to true, Bazel will compute the hash sum of all remote downloads and discard the remotely cached values if they don't match the expected value.
Miscellaneous options, not otherwise categorized.:
--auto_output_filter =<none, all, packages or subpackages> default: "none"
If --output_filter is not specified, then the value for this option is used create a filter automatically. Allowed values are 'none' (filter nothing / show everything), 'all' (filter everything / show nothing), 'packages' (include output from rules in packages mentioned on the Blaze command line), and 'subpackages' (like 'packages', but also include subpackages). For the 'packages' and 'subpackages' values //java/foo and //javatests/foo are treated as one package)'.
--[no]build_manual_tests default: "false"
Forces test targets tagged 'manual' to be built. 'manual' tests are excluded from processing. This option forces them to be built (but not executed).
--build_tag_filters =<comma-separated list of options> default: ""
Specifies a comma-separated list of tags. Each tag can be optionally preceded with '-' to specify excluded tags. Only those targets will be built that contain at least one included tag and do not contain any excluded tags. This option does not affect the set of tests executed with the 'test' command; those are be governed by the test filtering options, for example '--test_tag_filters'
--[no]build_tests_only default: "false"
If specified, only *_test and test_suite rules will be built and other targets specified on the command line will be ignored. By default everything that was requested will be built.
--combined_report =<none or lcov> default: "none"
Specifies desired cumulative coverage report type. At this point only LCOV is supported.
--[no]compile_one_dependency default: "false"
Compile a single dependency of the argument files. This is useful for syntax checking source files in IDEs, for example, by rebuilding a single target that depends on the source file to detect errors as early as possible in the edit/build/test cycle. This argument affects the way all non-flag arguments are interpreted; instead of being targets to build they are source filenames. For each source filename an arbitrary target that depends on it will be built.
--deleted_packages =<comma-separated list of package names> default: ""
A comma-separated list of names of packages which the build system will consider non-existent, even if they are visible somewhere on the package path. Use this option when deleting a subpackage 'x/y' of an existing package 'x'. For example, after deleting x/y/BUILD in your client, the build system may complain if it encounters a label '//x:y/z' if that is still provided by another package_path entry. Specifying --deleted_packages x/y avoids this problem.
--[no]discard_analysis_cache default: "false"
Discard the analysis cache immediately after the analysis phase completes. Reduces memory usage by ~10%, but makes further incremental builds slower.
--disk_cache =<a path> default: see description
A path to a directory where Bazel can read and write actions and action outputs. If the directory does not exist, it will be created.
--embed_label =<a one-line string> default: ""
Embed source control revision or release label in binary
--execution_log_binary_file =<a path> default: see description
Log the executed spawns into this file as delimited Spawn protos, according to src/main/protobuf/spawn.proto. The log is first written unordered and is then, at the end of the invocation, sorted in a stable order (can be CPU and memory intensive). Related flags: --execution_log_json_file (ordered text json format), --experimental_execution_log_file (unordered binary protobuf format), --subcommands (for displaying subcommands in terminal output).
--execution_log_json_file =<a path> default: see description
Log the executed spawns into this file as json representation of the delimited Spawn protos, according to src/main/protobuf/spawn.proto. The log is first written unordered and is then, at the end of the invocation, sorted in a stable order (can be CPU and memory intensive). Related flags: Related flags: --execution_log_binary_file (ordered binary protobuf format), --experimental_execution_log_file (unordered binary protobuf format), --subcommands (for displaying subcommands in terminal output).
--[no]expand_test_suites default: "true"
Expand test_suite targets into their constituent tests before analysis. When this flag is turned on (the default), negative target patterns will apply to the tests belonging to the test suite, otherwise they will not. Turning off this flag is useful when top-level aspects are applied at command line: then they can analyze test_suite targets.
Tags: loading_and_analysis
--experimental_execution_log_file =<a path> default: see description
Log the executed spawns into this file as delimited Spawn protos, according to src/main/protobuf/spawn.proto. This file is written in order of the execution of the Spawns. Related flags: --execution_log_binary_file (ordered binary protobuf format), --execution_log_json_file (ordered text json format), --subcommands (for displaying subcommands in terminal output).
--[no]experimental_execution_log_spawn_metrics default: "false"
Include spawn metrics in the executed spawns log.
--experimental_extra_action_filter =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths> default: ""
Deprecated in favor of aspects. Filters set of targets to schedule extra_actions for.
--[no]experimental_extra_action_top_level_only default: "false"
Deprecated in favor of aspects. Only schedules extra_actions for top level targets.
--experimental_local_execution_delay =<an integer> default: "1000"
How many milliseconds should local execution be delayed, if remote execution was faster during a build at least once?
--experimental_persistent_javac
Enable the experimental persistent Java compiler.
Expands to:
--strategy=Javac=worker
--strategy=JavaIjar=local
--strategy=JavaDeployJar=local
--strategy=JavaSourceJar=local
--strategy=Turbine=local
--[no]experimental_prioritize_local_actions default: "true"
If set, actions that can only run locally are given first chance at acquiring resources, dynamically run workers get second chance, and dynamically-run standalone actions come last.
Tags: execution
--experimental_spawn_scheduler
Enable dynamic execution by running actions locally and remotely in parallel. Bazel spawns each action locally and remotely and picks the one that completes first. If an action supports workers, the local action will be run in the persistent worker mode. To enable dynamic execution for an individual action mnemonic, use the `--internal_spawn_scheduler` and `--strategy=<mnemonic>=dynamic` flags instead.
Expands to:
--internal_spawn_scheduler
--spawn_strategy=dynamic
--[no]experimental_worker_as_resource default: "false"
If enabled, workers are acquired as resources from ResourceManager.
Tags: execution
--[no]experimental_worker_cancellation default: "false"
If enabled, Bazel may send cancellation requests to workers that support them.
Tags: execution
--experimental_worker_max_multiplex_instances =<[name=]value, where value is an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> multiple uses are accumulated
How many WorkRequests a multiplex worker process may receive in parallel if you use the 'worker' strategy with --experimental_worker_multiplex. May be specified as [name=value] to give a different value per worker mnemonic. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 'auto' calculates a reasonable default based on machine capacity. "=value" sets a default for unspecified mnemonics.
Tags: host_machine_resource_optimizations
--[no]experimental_worker_multiplex default: "true"
If enabled, workers that support the experimental multiplexing feature will use that feature.
--[no]experimental_worker_multiplex_sandboxing default: "false"
If enabled, multiplex workers will be sandboxed, using a separate sandbox directory per work request. Only workers that have the 'supports-multiplex-sandboxing' execution requirement will be sandboxed.
Tags: execution
--[no]experimental_worker_strict_flagfiles default: "false"
If enabled, actions arguments for workers that do not follow the worker specification will cause an error. Worker arguments must have exactly one @flagfile argument as the last of its list of arguments.
Tags: execution
--google_auth_scopes =<comma-separated list of options> default: "https://www.googleapis.com/auth/cloud-platform"
A comma-separated list of Google Cloud authentication scopes.
--google_credentials =<a string> default: see description
Specifies the file to get authentication credentials from. See https://cloud.google.com/docs/authentication for details.
--[no]google_default_credentials default: "false"
Whether to use 'Google Application Default Credentials' for authentication. See https://cloud.google.com/docs/authentication for details. Disabled by default.
--grpc_keepalive_time =<An immutable length of time.> default: see description
Configures keep-alive pings for outgoing gRPC connections. If this is set, then Bazel sends pings after this much time of no read operations on the connection, but only if there is at least one pending gRPC call. Times are treated as second granularity; it is an error to set a value less than one second. By default, keep-alive pings are disabled. You should coordinate with the service owner before enabling this setting.
--grpc_keepalive_timeout =<An immutable length of time.> default: "20s"
Configures a keep-alive timeout for outgoing gRPC connections. If keep-alive pings are enabled with --grpc_keepalive_time, then Bazel times out a connection if it does not receive a ping reply after this much time. Times are treated as second granularity; it is an error to set a value less than one second. If keep-alive pings are disabled, then this setting is ignored.
--high_priority_workers =<a string> multiple uses are accumulated
Mnemonics of workers to run with high priority. When high priority workers are running all other workers are throttled.
--[no]ignore_unsupported_sandboxing default: "false"
Do not print a warning when sandboxed execution is not supported on this system.
--[no]incompatible_dont_use_javasourceinfoprovider default: "false"
No-op
Tags: incompatible_change
--local_cpu_resources =<an integer, or "HOST_CPUS", optionally followed by [-|*]<float>.> default: "HOST_CPUS"
Explicitly set the total number of local CPU cores available to Bazel to spend on build actions executed locally. Takes an integer, or "HOST_CPUS", optionally followed by [-|*]<float> (eg. HOST_CPUS*.5 to use half the available CPU cores).By default, ("HOST_CPUS"), Bazel will query system configuration to estimate the number of CPU cores available.
--local_ram_resources =<an integer, or "HOST_RAM", optionally followed by [-|*]<float>.> default: "HOST_RAM*.67"
Explicitly set the total amount of local host RAM (in MB) available to Bazel to spend on build actions executed locally. Takes an integer, or "HOST_RAM", optionally followed by [-|*]<float> (eg. HOST_RAM*.5 to use half the available RAM). By default, ("HOST_RAM*.67"), Bazel will query system configuration to estimate the amount of RAM available and will use 67% of it.
--local_termination_grace_seconds =<an integer> default: "15"
Time to wait between terminating a local process due to timeout and forcefully shutting it down.
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.
--package_path =<colon-separated list of options> default: "%workspace%"
A colon-separated list of where to look for packages. Elements beginning with '%workspace%' are relative to the enclosing workspace. If omitted or empty, the default is the output of 'bazel info default-package-path'.
--sandbox_add_mount_pair =<a single path or a 'source:target' pair> multiple uses are accumulated
Add additional path pair to mount in sandbox.
--sandbox_base =<a string> default: ""
Lets the sandbox create its sandbox directories underneath this path. Specify a path on tmpfs (like /run/shm) to possibly improve performance a lot when your build / tests have many input files. Note: You need enough RAM and free space on the tmpfs to hold output and intermediate files generated by running actions.
--sandbox_block_path =<a string> multiple uses are accumulated
For sandboxed actions, disallow access to this path.
--[no]sandbox_debug default: "false"
Enables debugging features for the sandboxing feature. This includes two things: first, the sandbox root contents are left untouched after a build (and if sandboxfs is in use, the file system is left mounted); and second, prints extra debugging information on execution. This can help developers of Bazel or Starlark rules with debugging failures due to missing input files, etc.
--[no]sandbox_default_allow_network default: "true"
Allow network access by default for actions; this may not work with all sandboxing implementations.
--[no]sandbox_fake_hostname default: "false"
Change the current hostname to 'localhost' for sandboxed actions.
--[no]sandbox_fake_username default: "false"
Change the current username to 'nobody' for sandboxed actions.
--sandbox_tmpfs_path =<an absolute path> multiple uses are accumulated
For sandboxed actions, mount an empty, writable directory at this absolute path (if supported by the sandboxing implementation, ignored otherwise).
--sandbox_writable_path =<a string> multiple uses are accumulated
For sandboxed actions, make an existing directory writable in the sandbox (if supported by the sandboxing implementation, ignored otherwise).
--[no]show_loading_progress default: "true"
If enabled, causes Bazel to print "Loading package:" messages.
--test_lang_filters =<comma-separated list of options> default: ""
Specifies a comma-separated list of test languages. Each language can be optionally preceded with '-' to specify excluded languages. Only those test targets will be found that are written in the specified languages. The name used for each language should be the same as the language prefix in the *_test rule, eg one of 'cc', 'java', 'py', etc. This option affects --build_tests_only behavior and the test command.
--test_size_filters =<comma-separated list of values: small, medium, large or enormous> default: ""
Specifies a comma-separated list of test sizes. Each size can be optionally preceded with '-' to specify excluded sizes. Only those test targets will be found that contain at least one included size and do not contain any excluded sizes. This option affects --build_tests_only behavior and the test command.
--test_tag_filters =<comma-separated list of options> default: ""
Specifies a comma-separated list of test tags. Each tag can be optionally preceded with '-' to specify excluded tags. Only those test targets will be found that contain at least one included tag and do not contain any excluded tags. This option affects --build_tests_only behavior and the test command.
--test_timeout_filters =<comma-separated list of values: short, moderate, long or eternal> default: ""
Specifies a comma-separated list of test timeouts. Each timeout can be optionally preceded with '-' to specify excluded timeouts. Only those test targets will be found that contain at least one included timeout and do not contain any excluded timeouts. This option affects --build_tests_only behavior and the test command.
--tls_certificate =<a string> default: see description
Specify a path to a TLS certificate that is trusted to sign server certificates.
--tls_client_certificate =<a string> default: see description
Specify the TLS client certificate to use; you also need to provide a client key to enable client authentication.
--tls_client_key =<a string> default: see description
Specify the TLS client key to use; you also need to provide a client certificate to enable client authentication.
--worker_extra_flag =<a 'name=value' assignment> multiple uses are accumulated
Extra command-flags that will be passed to worker processes in addition to --persistent_worker, keyed by mnemonic (eg --worker_extra_flag=Javac=--debug.
--worker_max_instances =<[name=]value, where value is an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> multiple uses are accumulated
How many instances of a worker process (like the persistent Java compiler) may be launched if you use the 'worker' strategy. May be specified as [name=value] to give a different value per worker mnemonic. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 'auto' calculates a reasonable default based on machine capacity. "=value" sets a default for unspecified mnemonics.
Tags: host_machine_resource_optimizations
--[no]worker_quit_after_build default: "false"
If enabled, all workers quit after a build is done.
--[no]worker_sandboxing default: "false"
If enabled, workers will be executed in a sandboxed environment.
--[no]worker_verbose default: "false"
If enabled, prints verbose messages when workers are started, shutdown, ...
--workspace_status_command =<path> default: ""
A command invoked at the beginning of the build to provide status information about the workspace in the form of key/value pairs. See the User's Manual for the full specification. Also see tools/buildstamp/get_workspace_status for an example.
Options that control build execution:
--[no]check_up_to_date default: "false"
Don't perform the build, just check if it is up-to-date. If all targets are up-to-date, the build completes successfully. If any step needs to be executed an error is reported and the build fails.
Tags: execution
Whether to make direct file system calls to create symlink trees
Tags: loading_and_analysis , execution , experimental
--[no]experimental_remotable_source_manifests default: "false"
Whether to make source manifest actions remotable
Tags: loading_and_analysis , execution , experimental
--[no]experimental_split_coverage_postprocessing default: "false"
If true, then Bazel will run coverage postprocessing for test in a new spawn.
Tags: execution
--[no]experimental_split_xml_generation default: "true"
If this flag is set, and a test action does not generate a test.xml file, then Bazel uses a separate action to generate a dummy test.xml file containing the test log. Otherwise, Bazel generates a test.xml as part of the test action.
Tags: execution
--[no]experimental_strict_fileset_output default: "false"
If this option is enabled, filesets will treat all output artifacts as regular files. They will not traverse directories or be sensitive to symlinks.
Tags: execution
--genrule_strategy =<comma-separated list of options> default: ""
Specify how to execute genrules. This flag will be phased out. Instead, use --spawn_strategy=<value> to control all actions or --strategy=Genrule=<value> to control genrules only.
Tags: execution
--jobs =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> [ -j ] default: "auto"
The number of concurrent jobs to run. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". Values must be between 1 and 5000. Values above 2500 may cause memory issues. "auto" calculates a reasonable default based on host resources.
Tags: host_machine_resource_optimizations , execution
--[no]keep_going [ -k ] default: "false"
Continue as much as possible after an error. While the target that failed and those that depend on it cannot be analyzed, other prerequisites of these targets can be.
Tags: eagerness_to_exit
--loading_phase_threads =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> default: "auto"
Number of parallel threads to use for the loading/analysis phase.Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". "auto" sets a reasonable default based on host resources. Must be at least 1.
Tags: bazel_internal_configuration
--modify_execution_info =<regex=[+-]key,regex=[+-]key,...> default: ""
Add or remove keys from an action's execution info based on action mnemonic. Applies only to actions which support execution info. Many common actions support execution info, eg Genrule, CppCompile, Javac, StarlarkAction, TestRunner. When specifying multiple values, order matters because many regexes may apply to the same mnemonic. Syntax: "regex=[+-]key,regex=[+-]key,...". Examples: '.*=+x,.*=-y,.*=+z' adds 'x' and 'z' to, and removes 'y' from, the execution info for all actions. 'Genrule=+requires-x' adds 'requires-x' to the execution info for all Genrule actions. '(?!Genrule).*=-requires-x' removes 'requires-x' from the execution info for all non-Genrule actions.
Tags: execution , affects_outputs , loading_and_analysis
--persistent_android_resource_processor
Enable the persistent Android resource processor by using workers.
Expands to:
--internal_persistent_busybox_tools
--strategy=AaptPackage=worker
--strategy=AndroidResourceParser=worker
--strategy=AndroidResourceValidator=worker
--strategy=AndroidResourceCompiler=worker
--strategy=RClassGenerator=worker
--strategy=AndroidResourceLink=worker
--strategy=AndroidAapt2=worker
--strategy=AndroidAssetMerger=worker
--strategy=AndroidResourceMerger=worker
--strategy=AndroidCompiledResourceMerger=worker
--strategy=ManifestMerger=worker
--strategy=AndroidManifestMerger=worker
--strategy=Aapt2Optimize=worker
--strategy=AARGenerator=worker

Tags: host_machine_resource_optimizations , execution
--spawn_strategy =<comma-separated list of options> default: ""
Specify how spawn actions are executed by default. Accepts a comma-separated list of strategies from highest to lowest priority. For each action Bazel picks the strategy with the highest priority that can execute the action. The default value is "remote,worker,sandboxed,local". See https://blog.bazel.build/2019/06/19/list-strategy.html for details.
Tags: execution
--strategy =<a '[name=]value1[,..,valueN]' assignment> multiple uses are accumulated
Specify how to distribute compilation of other spawn actions. Accepts a comma-separated list of strategies from highest to lowest priority. For each action Bazel picks the strategy with the highest priority that can execute the action. The default value is "remote,worker,sandboxed,local". This flag overrides the values set by --spawn_strategy (and --genrule_strategy if used with mnemonic Genrule). See https://blog.bazel.build/2019/06/19/list-strategy.html for details.
Tags: execution
--strategy_regexp =<a '<RegexFilter>=value[,value]' assignment> multiple uses are accumulated
Override which spawn strategy should be used to execute spawn actions that have descriptions matching a certain regex_filter. See --per_file_copt for details onregex_filter matching. The first regex_filter that matches the description is used. This option overrides other flags for specifying strategy. Example: --strategy_regexp=//foo.*\.cc,-//foo/bar=local means to run actions using local strategy if their descriptions match //foo.*.cc but not //foo/bar. Example: --strategy_regexp='Compiling.*/bar=local --strategy_regexp=Compiling=sandboxed will run 'Compiling //foo/bar/baz' with the 'local' strategy, but reversing the order would run it with 'sandboxed'.
Tags: execution
Options that configure the toolchain used for action execution:
--android_compiler =<a string> default: see description
The Android target compiler.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--android_crosstool_top =<a build target label> default: "//external:android/crosstool"
The location of the C++ compiler used for Android builds.
Tags: affects_outputs , changes_inputs , loading_and_analysis , loses_incremental_state
--android_grte_top =<a label> default: see description
The Android target grte_top.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--android_manifest_merger =<legacy, android or force_android> default: "android"
Selects the manifest merger to use for android_binary rules. Flag to help thetransition to the Android manifest merger from the legacy merger.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--android_platforms =<a build target label> default: ""
Sets the platforms that android_binary targets use. If multiple platforms are specified, then the binary is a fat APKs, which contains native binaries for each specified target platform.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--android_sdk =<a build target label> default: "@bazel_tools//tools/android:sdk"
Specifies Android SDK/platform that is used to build Android applications.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--apple_compiler =<a string> default: see description
The Apple target compiler. Useful for selecting variants of a toolchain (eg xcode-beta).
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--apple_crosstool_top =<a build target label> default: "@bazel_tools//tools/cpp:toolchain"
The label of the crosstool package to be used in Apple and Objc rules and their dependencies.
Tags: loses_incremental_state , changes_inputs
--apple_grte_top =<a build target label> default: see description
The Apple target grte_top.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--cc_output_directory_tag =<a string> default: ""
Specifies a suffix to be added to the configuration directory.
Tags: affects_outputs , explicit_in_output_path
--compiler =<a string> default: see description
The C++ compiler to use for compiling the target.
Tags: loading_and_analysis , execution
--coverage_output_generator =<a build target label> default: "@bazel_tools//tools/test:lcov_merger"
Location of the binary that is used to postprocess raw coverage reports. This must currently be a filegroup that contains a single file, the binary. Defaults to '//tools/test:lcov_merger'.
Tags: changes_inputs , affects_outputs , loading_and_analysis
--coverage_report_generator =<a build target label> default: "@bazel_tools//tools/test:coverage_report_generator"
Location of the binary that is used to generate coverage reports. This must currently be a filegroup that contains a single file, the binary. Defaults to '//tools/test:coverage_report_generator'.
Tags: changes_inputs , affects_outputs , loading_and_analysis
--coverage_support =<a build target label> default: "@bazel_tools//tools/test:coverage_support"
Location of support files that are required on the inputs of every test action that collects code coverage. Defaults to '//tools/test:coverage_support'.
Tags: changes_inputs , affects_outputs , loading_and_analysis
--crosstool_top =<a build target label> default: "@bazel_tools//tools/cpp:toolchain"
The label of the crosstool package to be used for compiling C++ code.
Tags: loading_and_analysis , changes_inputs , affects_outputs
--custom_malloc =<a build target label> default: see description
Specifies a custom malloc implementation. This setting overrides malloc attributes in build rules.
Tags: changes_inputs , affects_outputs
--experimental_add_exec_constraints_to_targets =<a '<RegexFilter>=<label1>[,<label2>,...]' assignment> multiple uses are accumulated
List of comma-separated regular expressions, each optionally prefixed by - (negative expression), assigned (=) to a list of comma-separated constraint value targets. If a target matches no negative expression and at least one positive expression its toolchain resolution will be performed as if it had declared the constraint values as execution constraints. Example: //demo,-test=@platforms//cpus:x86_64 will add 'x86_64' to any target under //demo except for those whose name contains 'test'.
Tags: loading_and_analysis
--[no]experimental_enable_objc_cc_deps default: "true"
Allows objc_* rules to depend on cc_library and causes any objc dependencies to be built with --cpu set to "ios_<--ios_cpu>" for any values in --ios_multi_cpu.
Tags: loading_and_analysis , incompatible_change
--[no]experimental_include_xcode_execution_requirements default: "false"
If set, add a "requires-xcode:{version}" execution requirement to every Xcode action. If the xcode version has a hyphenated label, also add a "requires-xcode-label:{version_label}" execution requirement.
Tags: loses_incremental_state , loading_and_analysis , execution
--[no]experimental_prefer_mutual_xcode default: "true"
If true, use the most recent Xcode that is available both locally and remotely. If false, or if there are no mutual available versions, use the local Xcode version selected via xcode-select.
Tags: loses_incremental_state
--extra_execution_platforms =<comma-separated list of options> multiple uses are accumulated
The platforms that are available as execution platforms to run actions. Platforms can be specified by exact target, or as a target pattern. These platforms will be considered before those declared in the WORKSPACE file by register_execution_platforms().
Tags: execution
--extra_toolchains =<comma-separated list of options> multiple uses are accumulated
The toolchain rules to be considered during toolchain resolution. Toolchains can be specified by exact target, or as a target pattern. These toolchains will be considered before those declared in the WORKSPACE file by register_toolchains().
Tags: affects_outputs , changes_inputs , loading_and_analysis
--grte_top =<a label> default: see description
A label to a checked-in libc library. The default value is selected by the crosstool toolchain, and you almost never need to override it.
Tags: action_command_lines , affects_outputs
--host_compiler =<a string> default: see description
The C++ compiler to use for host compilation. It is ignored if --host_crosstool_top is not set.
Tags: loading_and_analysis , execution
--host_crosstool_top =<a build target label> default: see description
By default, the --crosstool_top and --compiler options are also used for the host configuration. If this flag is provided, Bazel uses the default libc and compiler for the given crosstool_top.
Tags: loading_and_analysis , changes_inputs , affects_outputs
--host_grte_top =<a label> default: see description
If specified, this setting overrides the libc top-level directory (--grte_top) for the host configuration.
Tags: action_command_lines , affects_outputs
--host_platform =<a build target label> default: ""
The label of a platform rule that describes the host system.
Tags: affects_outputs , changes_inputs , loading_and_analysis
--[no]incompatible_disable_expand_if_all_available_in_flag_set default: "true"
If true, Bazel will not allow specifying expand_if_all_available in flag_sets(see https://github.com/bazelbuild/bazel/issues/7008 for migration instructions).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_dont_enable_host_nonhost_crosstool_features default: "true"
If true, Bazel will not enable 'host' and 'nonhost' features in the c++ toolchain (see https://github.com/bazelbuild/bazel/issues/7407 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enable_android_toolchain_resolution default: "false"
Use toolchain resolution to select the Android SDK for android rules (Starlark and native)
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enable_apple_toolchain_resolution default: "false"
Use toolchain resolution to select the Apple SDK for apple rules (Starlark and native)
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_make_thinlto_command_lines_standalone default: "true"
If true, Bazel will not reuse C++ link action command lines for lto indexing command lines (see https://github.com/bazelbuild/bazel/issues/6791 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain default: "true"
If true, Bazel will complain when cc_toolchain.cpu and cc_toolchain.compiler attributes are set (see https://github.com/bazelbuild/bazel/issues/7075 for migration instructions).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_remove_legacy_whole_archive default: "true"
If true, Bazel will not link library dependencies as whole archive by default (see https://github.com/bazelbuild/bazel/issues/7362 for migration instructions).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_require_ctx_in_configure_features default: "true"
If true, Bazel will require 'ctx' parameter in to cc_common.configure_features (see https://github.com/bazelbuild/bazel/issues/7793 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]interface_shared_objects default: "true"
Use interface shared objects if supported by the toolchain. All ELF toolchains currently support this setting.
Tags: loading_and_analysis , affects_outputs , affects_outputs
--ios_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the iOS SDK to use to build iOS applications. If unspecified, uses default iOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--macos_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the macOS SDK to use to build macOS applications. If unspecified, uses default macOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--minimum_os_version =<a string> default: see description
The minimum OS version which your compilation targets.
Tags: loading_and_analysis , affects_outputs
--platform_mappings =<a relative path> default: ""
The location of a mapping file that describes which platform to use if none is set or which flags to set when a platform already exists. Must be relative to the main workspace root. Defaults to 'platform_mappings' (a file directly under the workspace root).
Tags: affects_outputs , changes_inputs , loading_and_analysis
--platforms =<a build target label> default: ""
The labels of the platform rules describing the target platforms for the current command.
Tags: affects_outputs , changes_inputs , loading_and_analysis
--python2_path =<a string> default: see description
Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.
Tags: no_op , deprecated
--python3_path =<a string> default: see description
Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.
Tags: no_op , deprecated
--python_path =<a string> default: see description
The absolute path of the Python interpreter invoked to run Python targets on the target platform. Deprecated; disabled by --incompatible_use_python_toolchains.
Tags: loading_and_analysis , affects_outputs
--python_top =<a build target label> default: see description
The label of a py_runtime representing the Python interpreter invoked to run Python targets on the target platform. Deprecated; disabled by --incompatible_use_python_toolchains.
Tags: loading_and_analysis , affects_outputs
--target_platform_fallback =<a build target label> default: "@local_config_platform//:host"
The label of a platform rule that should be used if no target platform is set and no platform mapping matches the current set of flags.
Tags: affects_outputs , changes_inputs , loading_and_analysis
--tvos_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the tvOS SDK to use to build tvOS applications. If unspecified, uses default tvOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--watchos_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the watchOS SDK to use to build watchOS applications. If unspecified, uses default watchOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--xcode_version =<a string> default: see description
If specified, uses Xcode of the given version for relevant build actions. If unspecified, uses the executor default version of Xcode.
Tags: loses_incremental_state
--xcode_version_config =<a build target label> default: "@bazel_tools//tools/cpp:host_xcodes"
The label of the xcode_config rule to be used for selecting the Xcode version in the build configuration.
Tags: loses_incremental_state , loading_and_analysis
Options that control the output of the command:
--[no]apple_enable_auto_dsym_dbg default: "false"
Whether to force enable generating debug symbol(.dSYM) file(s) for dbg builds.
Tags: affects_outputs , action_command_lines
--[no]apple_generate_dsym default: "false"
Whether to generate debug symbol(.dSYM) file(s).
Tags: affects_outputs , action_command_lines
--[no]build default: "true"
Execute the build; this is the usual behaviour. Specifying --nobuild causes the build to stop before executing the build actions, returning zero iff the package loading and analysis phases completed successfully; this mode is useful for testing those phases.
Tags: execution , affects_outputs
If true, build runfiles symlink forests for all targets. If false, write only manifests when possible.
Tags: affects_outputs
--[no]build_runfile_manifests default: "true"
If true, write runfiles manifests for all targets. If false, omit them. Local tests will fail to run when false.
Tags: affects_outputs
--[no]build_test_dwp default: "false"
If enabled, when building C++ tests statically and with fission the .dwp file for the test binary will be automatically built as well.
Tags: loading_and_analysis , affects_outputs
--cc_proto_library_header_suffixes =<comma-separated list of options> default: ".pb.h"
Sets the prefixes of header files that a cc_proto_library creates.
Tags: affects_outputs , loading_and_analysis
--cc_proto_library_source_suffixes =<comma-separated list of options> default: ".pb.cc"
Sets the prefixes of source files that a cc_proto_library creates.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_proto_descriptor_sets_include_source_info default: "false"
Run extra actions for alternative Java api versions in a proto_library.
Tags: affects_outputs , loading_and_analysis , experimental
--[no]experimental_proto_extra_actions default: "false"
Run extra actions for alternative Java api versions in a proto_library.
Tags: affects_outputs , loading_and_analysis , experimental
--[no]experimental_run_validations default: "true"
Use --run_validations instead.
Tags: execution , affects_outputs
--[no]experimental_save_feature_state default: "false"
Save the state of enabled and requested feautres as an output of compilation.
Tags: affects_outputs , experimental
--[no]experimental_use_validation_aspect default: "false"
Whether to run validation actions using aspect (for parallelism with tests).
Tags: execution , affects_outputs
--fission =<a set of compilation modes> default: "no"
Specifies which compilation modes use fission for C++ compilations and links. May be any combination of {'fastbuild', 'dbg', 'opt'} or the special values 'yes' to enable all modes and 'no' to disable all modes.
Tags: loading_and_analysis , action_command_lines , affects_outputs
--[no]legacy_external_runfiles default: "true"
If true, build runfiles symlink forests for external repositories under .runfiles/wsname/external/repo (in addition to .runfiles/repo).
Tags: affects_outputs
--[no]objc_generate_linkmap default: "false"
Specifies whether to generate a linkmap file.
Tags: affects_outputs
--output_groups =<comma-separated list of options> multiple uses are accumulated
A list of comma-separated output group names, each of which optionally prefixed by a + or a -. A group prefixed by + is added to the default set of output groups, while a group prefixed by - is removed from the default set. If at least one group is not prefixed, the default set of output groups is omitted. For example, --output_groups=+foo,+bar builds the union of the default set, foo, and bar, while --output_groups=foo,bar overrides the default set such that only foo and bar are built.
Tags: execution , affects_outputs
--[no]run_validations default: "true"
Whether to run validation actions as part of the build. See https://bazel.build/rules/rules#validation_actions
Tags: execution , affects_outputs
--[no]save_temps default: "false"
If set, temporary outputs from gcc will be saved. These include .s files (assembler code), .i files (preprocessed C) and .ii files (preprocessed C++).
Tags: affects_outputs
Options that let the user configure the intended output, affecting its value, as opposed to its existence:
--action_env =<a 'name=value' assignment with an optional value part> multiple uses are accumulated
Specifies the set of environment variables available to actions with target configuration. Variables can be either specified by name, in which case the value will be taken from the invocation environment, or by the name=value pair which sets the value independent of the invocation environment. This option can be used multiple times; for options given for the same variable, the latest wins, options for different variables accumulate.
Tags: action_command_lines
--android_cpu =<a string> default: "armeabi-v7a"
The Android target CPU.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]android_databinding_use_androidx default: "false"
Generate AndroidX-compatible data-binding files. This is only used with databinding v2.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--[no]android_databinding_use_v3_4_args default: "false"
Use android databinding v2 with 3.4.0 argument
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--android_dynamic_mode =<off, default or fully> default: "off"
Determines whether C++ deps of Android rules will be linked dynamically when a cc_binary does not explicitly create a shared library. 'default' means bazel will choose whether to link dynamically. 'fully' means all libraries will be linked dynamically. 'off' means that all libraries will be linked in mostly static mode.
Tags: affects_outputs , loading_and_analysis
--android_manifest_merger_order =<alphabetical, alphabetical_by_configuration or dependency> default: "alphabetical"
Sets the order of manifests passed to the manifest merger for Android binaries. ALPHABETICAL means manifests are sorted by path relative to the execroot. ALPHABETICAL_BY_CONFIGURATION means manifests are sorted by paths relative to the configuration directory within the output directory. DEPENDENCY means manifests are ordered with each library's manifest coming before the manifests of its dependencies.
Tags: action_command_lines , execution
--[no]android_resource_shrinking default: "false"
Enables resource shrinking for android_binary APKs that use ProGuard.
Tags: affects_outputs , loading_and_analysis
--apple_bitcode =<'mode' or 'platform=mode', where 'mode' is none, embedded_markers or embedded, and 'platform' is ios, watchos, tvos, macos or catalyst> multiple uses are accumulated
Specify the Apple bitcode mode for compile steps targeting device architectures. Values are of the form '[platform=]mode', where the platform (which must be 'ios', 'macos', 'tvos', or 'watchos') is optional. If provided, the bitcode mode is applied for that platform specifically; if omitted, it is applied for all platforms. The mode must be 'none', 'embedded_markers', or 'embedded'. This option may be provided multiple times.
Tags: loses_incremental_state
--aspects =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of aspects to be applied to top-level targets. In the list, if aspect some_aspect specifies required aspect providers via required_aspect_providers, some_aspect will run after every aspect that was mentioned before it in the aspects list whose advertised providers satisfy some_aspect required aspect providers. Moreover, some_aspect will run after all its required aspects specified by requires attribute. some_aspect will then have access to the values of those aspects' providers. <bzl-file-label>%<aspect_name>, for example '//tools:my_def.bzl%my_aspect', where 'my_aspect' is a top-level value from a file tools/my_def.bzl
--[no]build_python_zip default: "auto"
Build python executable zip; on on Windows, off on other platforms
Tags: affects_outputs
--catalyst_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple Catalyst binaries.
Tags: loses_incremental_state , loading_and_analysis
--[no]collect_code_coverage default: "false"
If specified, Bazel will instrument code (using offline instrumentation where possible) and will collect coverage information during tests. Only targets that match --instrumentation_filter will be affected. Usually this option should not be specified directly - 'bazel coverage' command should be used instead.
Tags: affects_outputs
--compilation_mode =<fastbuild, dbg or opt> [ -c ] default: "fastbuild"
Specify the mode the binary will be built in. Values: 'fastbuild', 'dbg', 'opt'.
Tags: affects_outputs , action_command_lines , explicit_in_output_path
--conlyopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when compiling C source files.
Tags: action_command_lines , affects_outputs
--copt =<a string> multiple uses are accumulated
Additional options to pass to gcc.
Tags: action_command_lines , affects_outputs
--cpu =<a string> default: ""
The target CPU.
Tags: changes_inputs , affects_outputs , explicit_in_output_path
--cs_fdo_absolute_path =<a string> default: see description
Use CSFDO profile information to optimize compilation. Specify the absolute path name of the zip file containing the profile file, a raw or an indexed LLVM profile file.
Tags: affects_outputs
--cs_fdo_instrument =<a string> default: see description
Generate binaries with context sensitive FDO instrumentation. With Clang/LLVM compiler, it also accepts the directory name under which the raw profile file(s) will be dumped at runtime.
Tags: affects_outputs
--cs_fdo_profile =<a build target label> default: see description
The cs_fdo_profile representing the context sensitive profile to be used for optimization.
Tags: affects_outputs
--cxxopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when compiling C++ source files.
Tags: action_command_lines , affects_outputs
--define =<a 'name=value' assignment> multiple uses are accumulated
Each --define option specifies an assignment for a build variable.
Tags: changes_inputs , affects_outputs
--dynamic_mode =<off, default or fully> default: "default"
Determines whether C++ binaries will be linked dynamically. 'default' means Bazel will choose whether to link dynamically. 'fully' means all libraries will be linked dynamically. 'off' means that all libraries will be linked in mostly static mode.
Tags: loading_and_analysis , affects_outputs
--[no]enable_fdo_profile_absolute_path default: "true"
If set, use of fdo_absolute_profile_path will raise an error.
Tags: affects_outputs
--[no]enable_runfiles default: "auto"
Enable runfiles symlink tree; By default, it's off on Windows, on on other platforms.
Tags: affects_outputs
--experimental_action_listener =<a build target label> multiple uses are accumulated
Deprecated in favor of aspects. Use action_listener to attach an extra_action to existing build actions.
Tags: execution , experimental
--[no]experimental_android_compress_java_resources default: "false"
Compress Java resources in APKs
Tags: affects_outputs , loading_and_analysis , experimental
--[no]experimental_android_databinding_v2 default: "false"
Use android databinding v2
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--[no]experimental_android_resource_shrinking default: "false"
Enables resource shrinking for android_binary APKs that use ProGuard.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_android_rewrite_dexes_with_rex default: "false"
use rex tool to rewrite dex files
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
This flag controls how the convenience symlinks (the symlinks that appear in the workspace after the build) will be managed. Possible values: normal (default): Each kind of convenience symlink will be created or deleted, as determined by the build. clean: All symlinks will be unconditionally deleted. ignore: Symlinks will be left alone. log_only: Generate log messages as if 'normal' were passed, but don't actually perform any filesystem operations (useful for tools). Note that only symlinks whose names are generated by the current value of --symlink_prefix can be affected; if the prefix changes, any pre-existing symlinks will be left alone.
Tags: affects_outputs
This flag controls whether or not we will post the build eventConvenienceSymlinksIdentified to the BuildEventProtocol. If the value is true, the BuildEventProtocol will have an entry for convenienceSymlinksIdentified, listing all of the convenience symlinks created in your workspace. If false, then the convenienceSymlinksIdentified entry in the BuildEventProtocol will be empty.
Tags: affects_outputs
--experimental_multi_cpu =<comma-separated list of options> multiple uses are accumulated
This flag allows specifying multiple target CPUs. If this is specified, the --cpu option is ignored.
Tags: affects_outputs , experimental
--experimental_objc_fastbuild_options =<comma-separated list of options> default: "-O0,-DDEBUG=1"
Uses these strings as objc fastbuild compiler options.
Tags: action_command_lines
--[no]experimental_omitfp default: "false"
If true, use libunwind for stack unwinding, and compile with -fomit-frame-pointer and -fasynchronous-unwind-tables.
Tags: action_command_lines , affects_outputs , experimental
--[no]experimental_platform_in_output_dir default: "false"
If true, the target platform is used in the output directory name instead of the CPU.
Tags: affects_outputs , experimental
--[no]experimental_use_llvm_covmap default: "false"
If specified, Bazel will generate llvm-cov coverage map information rather than gcov when collect_code_coverage is enabled.
Tags: changes_inputs , affects_outputs , loading_and_analysis , experimental
--fat_apk_cpu =<comma-separated list of options> default: "armeabi-v7a"
Setting this option enables fat APKs, which contain native binaries for all specified target architectures, eg, --fat_apk_cpu=x86,armeabi-v7a. If this flag is specified, then --android_cpu is ignored for dependencies of android_binary rules.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]fat_apk_hwasan default: "false"
Whether to create HWASAN splits.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--fdo_instrument =<a string> default: see description
Generate binaries with FDO instrumentation. With Clang/LLVM compiler, it also accepts the directory name under which the raw profile file(s) will be dumped at runtime.
Tags: affects_outputs
--fdo_optimize =<a string> default: see description
Use FDO profile information to optimize compilation. Specify the name of a zip file containing a .gcda file tree, an afdo file containing an auto profile, or an LLVM profile file. This flag also accepts files specified as labels (eg `//foo/bar:file.afdo` - you may need to add an `exports_files` directive to the corresponding package) and labels pointing to `fdo_profile` targets. This flag will be superseded by the `fdo_profile` rule.
Tags: affects_outputs
--fdo_prefetch_hints =<a build target label> default: see description
Use cache prefetch hints.
Tags: affects_outputs
--fdo_profile =<a build target label> default: see description
The fdo_profile representing the profile to be used for optimization.
Tags: affects_outputs
--features =<a string> multiple uses are accumulated
The given features will be enabled or disabled by default for all packages. Specifying -<feature> will disable the feature globally. Negative features always override positive ones. This flag is used to enable rolling out default feature changes without a Bazel release.
Tags: changes_inputs , affects_outputs
--[no]force_pic default: "false"
If enabled, all C++ compilations produce position-independent code ("-fPIC"), links prefer PIC pre-built libraries over non-PIC libraries, and links produce position-independent executables ("-pie").
Tags: loading_and_analysis , affects_outputs
--host_action_env =<a 'name=value' assignment with an optional value part> multiple uses are accumulated
Specifies the set of environment variables available to actions with host or execution configurations. Variables can be either specified by name, in which case the value will be taken from the invocation environment, or by the name=value pair which sets the value independent of the invocation environment. This option can be used multiple times; for options given for the same variable, the latest wins, options for different variables accumulate.
Tags: action_command_lines
--host_compilation_mode =<fastbuild, dbg or opt> default: "opt"
Specify the mode the tools used during the build will be built in. Values: 'fastbuild', 'dbg', 'opt'.
Tags: affects_outputs , action_command_lines
--host_conlyopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when compiling C source files for host tools.
Tags: action_command_lines , affects_outputs
--host_copt =<a string> multiple uses are accumulated
Additional options to pass to gcc for host tools.
Tags: action_command_lines , affects_outputs
--host_cpu =<a string> default: ""
The host CPU.
Tags: changes_inputs , affects_outputs
--host_cxxopt =<a string> multiple uses are accumulated
Additional options to pass to gcc for host tools.
Tags: action_command_lines , affects_outputs
--host_force_python =<PY2 or PY3> default: see description
Overrides the Python version for the host configuration. Can be "PY2" or "PY3".
Tags: loading_and_analysis , affects_outputs
--host_linkopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when linking host tools.
Tags: action_command_lines , affects_outputs
--host_macos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible macOS version for host targets. If unspecified, uses 'macos_sdk_version'.
Tags: loses_incremental_state
--host_swiftcopt =<a string> multiple uses are accumulated
Additional options to pass to swiftc for host tools.
Tags: action_command_lines , affects_outputs
--[no]incompatible_avoid_conflict_dlls default: "true"
If enabled, all C++ dynamic linked libraries (DLLs) generated by cc_library on Windows will be renamed to name_{hash}.dll where hash is calculated based on the RepositoryName and the DLL's package path. This option is useful when you have one package which depends on severals cc_library with the same name (eg //foo/bar1:utils and //foo/bar2:utils).
Tags: loading_and_analysis , affects_outputs , incompatible_change
--[no]incompatible_merge_genfiles_directory default: "true"
If true, the genfiles directory is folded into the bin directory.
Tags: affects_outputs , incompatible_change
--[no]incompatible_use_platforms_repo_for_constraints default: "false"
If true, constraint settings from @bazel_tools are removed.
Tags: affects_outputs , incompatible_change
--[no]instrument_test_targets default: "false"
When coverage is enabled, specifies whether to consider instrumenting test rules. When set, test rules included by --instrumentation_filter are instrumented. Otherwise, test rules are always excluded from coverage instrumentation.
Tags: affects_outputs
--instrumentation_filter =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths> default: "-/javatests[/:],-/test/java[/:]"
When coverage is enabled, only rules with names included by the specified regex-based filter will be instrumented. Rules prefixed with '-' are excluded instead. Note that only non-test rules are instrumented unless --instrument_test_targets is enabled.
Tags: affects_outputs
--ios_cpu =<a string> default: "x86_64"
Specifies to target CPU of iOS compilation.
Tags: no_op , deprecated
--ios_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible iOS version for target simulators and devices. If unspecified, uses 'ios_sdk_version'.
Tags: loses_incremental_state
--ios_multi_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures to build an ios_application with. The result is a universal binary containing all specified architectures.
Tags: loses_incremental_state , loading_and_analysis
--[no]legacy_whole_archive default: "true"
Deprecated, superseded by --incompatible_remove_legacy_whole_archive (see https://github.com/bazelbuild/bazel/issues/7362 for details). When on, use --whole-archive for cc_binary rules that have linkshared=1 and either linkstatic=1 or '-static' in linkopts. This is for backwards compatibility only. A better alternative is to use alwayslink=1 where required.
Tags: action_command_lines , affects_outputs , deprecated
--linkopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when linking.
Tags: action_command_lines , affects_outputs
--ltobackendopt =<a string> multiple uses are accumulated
Additional option to pass to the LTO backend step (under --features=thin_lto).
Tags: action_command_lines , affects_outputs
--ltoindexopt =<a string> multiple uses are accumulated
Additional option to pass to the LTO indexing step (under --features=thin_lto).
Tags: action_command_lines , affects_outputs
--macos_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple macOS binaries.
Tags: loses_incremental_state , loading_and_analysis
--macos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible macOS version for targets. If unspecified, uses 'macos_sdk_version'.
Tags: loses_incremental_state
--[no]objc_debug_with_GLIBCXX default: "false"
If set, and compilation mode is set to 'dbg', define GLIBCXX_DEBUG, GLIBCXX_DEBUG_PEDANTIC and GLIBCPP_CONCEPT_CHECKS.
Tags: action_command_lines
--[no]objc_enable_binary_stripping default: "false"
Whether to perform symbol and dead-code strippings on linked binaries. Binary strippings will be performed if both this flag and --compilation_mode=opt are specified.
Tags: action_command_lines
--objccopt =<a string> multiple uses are accumulated
Additional options to pass to gcc when compiling Objective-C/C++ source files.
Tags: action_command_lines
--per_file_copt =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths followed by an @ and a comma separated list of options> multiple uses are accumulated
Additional options to selectively pass to gcc when compiling certain files. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --per_file_copt=//foo/.*\.cc,-//foo/bar\.cc@-O0 adds the -O0 command line option to the gcc command line of all cc files in //foo/ except bar.cc.
Tags: action_command_lines , affects_outputs
--per_file_ltobackendopt =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths followed by an @ and a comma separated list of options> multiple uses are accumulated
Additional options to selectively pass to LTO backend (under --features=thin_lto) when compiling certain backend objects. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns. option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --per_file_ltobackendopt=//foo/.*\.o,-//foo/bar\.o@-O0 adds the -O0 command line option to the LTO backend command line of all o files in //foo/ except bar.o.
Tags: action_command_lines , affects_outputs
--platform_suffix =<a string> default: see description
Specifies a suffix to be added to the configuration directory.
Tags: loses_incremental_state , affects_outputs , loading_and_analysis
--propeller_optimize =<a build target label> default: see description
Use Propeller profile information to optimize the build target.A propeller profile must consist of at least one of two files, a cc profile and a ld profile. This flag accepts a build label which must refer to the propeller profile input files. For example, the BUILD file that defines the label, in a/b/BUILD:propeller_optimize( name = "propeller_profile", cc_profile = "propeller_cc_profile.txt", ld_profile = "propeller_ld_profile.txt",)An exports_files directive may have to be added to the corresponding package to make these files visible to Bazel. The option must be used as: --propeller_optimize=//a/b:propeller_profile
Tags: action_command_lines , affects_outputs
--propeller_optimize_absolute_cc_profile =<a string> default: see description
Absolute path name of cc_profile file for Propeller Optimized builds.
Tags: affects_outputs
--propeller_optimize_absolute_ld_profile =<a string> default: see description
Absolute path name of ld_profile file for Propeller Optimized builds.
Tags: affects_outputs
--run_under =<a prefix in front of command> default: see description
Prefix to insert before the executables for the 'test' and 'run' commands. If the value is 'foo -bar', and the execution command line is 'test_binary -baz', then the final command line is 'foo -bar test_binary -baz'.This can also be a label to an executable target. Some examples are: 'valgrind', 'strace', 'strace -c', 'valgrind --quiet --num-callers=20', '//package:target', '//package:target --options'.
Tags: action_command_lines
--[no]share_native_deps default: "true"
If true, native libraries that contain identical functionality will be shared among different targets
Tags: loading_and_analysis , affects_outputs
--[no]stamp default: "false"
Stamp binaries with the date, username, hostname, workspace information, etc.
Tags: affects_outputs
--strip =<always, sometimes or never> default: "sometimes"
Specifies whether to strip binaries and shared libraries (using "-Wl,--strip-debug"). The default value of 'sometimes' means strip iff --compilation_mode=fastbuild.
Tags: affects_outputs
--stripopt =<a string> multiple uses are accumulated
Additional options to pass to strip when generating a '<name>.stripped' binary.
Tags: action_command_lines , affects_outputs
--swiftcopt =<a string> multiple uses are accumulated
Additional options to pass to Swift compilation.
Tags: action_command_lines
The prefix that is prepended to any of the convenience symlinks that are created after a build. If omitted, the default value is the name of the build tool followed by a hyphen. If '/' is passed, then no symlinks are created and no warning is emitted. Warning: the special functionality for '/' will be deprecated soon; use --experimental_convenience_symlinks=ignore instead.
Tags: affects_outputs
--tvos_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple tvOS binaries.
Tags: loses_incremental_state , loading_and_analysis
--tvos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible tvOS version for target simulators and devices. If unspecified, uses 'tvos_sdk_version'.
Tags: loses_incremental_state
--watchos_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple watchOS binaries.
Tags: loses_incremental_state , loading_and_analysis
--watchos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible watchOS version for target simulators and devices. If unspecified, uses 'watchos_sdk_version'.
Tags: loses_incremental_state
--xbinary_fdo =<a build target label> default: see description
Use XbinaryFDO profile information to optimize compilation. Specify the name of default cross binary profile. When the option is used together with --fdo_instrument/--fdo_optimize/--fdo_profile, those options will always prevail as if xbinary_fdo is never specified.
Tags: affects_outputs
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--auto_cpu_environment_group =<a build target label> default: ""
Declare the environment_group to use for automatically mapping cpu values to target_environment values.
Tags: changes_inputs , loading_and_analysis , experimental
--[no]check_licenses default: "false"
Check that licensing constraints imposed by dependent packages do not conflict with distribution modes of the targets being built. By default, licenses are not checked.
Tags: build_file_semantics
--[no]check_visibility default: "true"
If disabled, visibility errors are demoted to warnings.
Tags: build_file_semantics
--[no]desugar_for_android default: "true"
Whether to desugar Java 8 bytecode before dexing.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]enforce_constraints default: "true"
Checks the environments each target is compatible with and reports errors if any target has dependencies that don't support the same environments
Tags: build_file_semantics
--[no]experimental_allow_android_library_deps_without_srcs default: "false"
Flag to help transition from allowing to disallowing srcs-less android_library rules with deps. The depot needs to be cleaned up to roll this out by default.
Tags: eagerness_to_exit , loading_and_analysis
--[no]experimental_check_desugar_deps default: "true"
Whether to double-check correct desugaring at Android binary level.
Tags: eagerness_to_exit , loading_and_analysis , experimental
--[no]experimental_desugar_java8_libs default: "false"
Whether to include supported Java 8 libraries in apps for legacy devices.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--experimental_import_deps_checking =<off, warning or error> default: "OFF"
When enabled, check whether the dependencies of an aar_import are complete. This enforcement can break the build, or can just result in warnings.
Tags: loading_and_analysis
--experimental_strict_java_deps =<off, warn, error, strict or default> default: "default"
If true, checks that a Java target explicitly declares all directly used targets as dependencies.
Tags: build_file_semantics , eagerness_to_exit
--[no]incompatible_disable_native_android_rules default: "false"
If enabled, direct usage of the native Android rules is disabled. Please use the Starlark Android rules from https://github.com/bazelbuild/rules_android
Tags: eagerness_to_exit , incompatible_change
--[no]incompatible_disable_native_apple_binary_rule default: "false"
No-op. Kept here for backwards compatibility.
Tags: eagerness_to_exit , incompatible_change
--[no]incompatible_force_strict_header_check_from_starlark default: "true"
If enabled, set strict header checking in the Starlark API
Tags: loading_and_analysis , changes_inputs , incompatible_change
--[no]incompatible_validate_top_level_header_inclusions default: "true"
If true, Bazel will also validate top level directory header inclusions (see https://github.com/bazelbuild/bazel/issues/10047 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]strict_filesets default: "false"
If this option is enabled, filesets crossing package boundaries are reported as errors. It does not work when check_fileset_dependencies_recursively is disabled.
Tags: build_file_semantics , eagerness_to_exit
--strict_proto_deps =<off, warn, error, strict or default> default: "error"
Unless OFF, checks that a proto_library target explicitly declares all directly used targets as dependencies.
Tags: build_file_semantics , eagerness_to_exit , incompatible_change
--strict_public_imports =<off, warn, error, strict or default> default: "off"
Unless OFF, checks that a proto_library target explicitly declares all targets used in 'import public' as exported.
Tags: build_file_semantics , eagerness_to_exit , incompatible_change
--[no]strict_system_includes default: "false"
If true, headers found through system include paths (-isystem) are also required to be declared.
Tags: loading_and_analysis , eagerness_to_exit
--target_environment =<a build target label> multiple uses are accumulated
Declares this build's target environment. Must be a label reference to an "environment" rule. If specified, all top-level targets must be compatible with this environment.
Tags: changes_inputs
Options that affect the signing outputs of a build:
--apk_signing_method =<v1, v2, v1_v2 or v4> default: "v1_v2"
Implementation to use to sign APKs
Tags: action_command_lines , affects_outputs , loading_and_analysis
--[no]device_debug_entitlements default: "true"
If set, and compilation mode is not 'opt', objc apps will include debug entitlements when signing.
Tags: changes_inputs
--ios_signing_cert_name =<a string> default: see description
Certificate name to use for iOS signing. If not set will fall back to provisioning profile. May be the certificate's keychain identity preference or (substring) of the certificate's common name, as per codesign's man page (SIGNING IDENTITIES).
Tags: action_command_lines
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]incompatible_config_setting_private_default_visibility default: "false"
If incompatible_enforce_config_setting_visibility=false, this is a noop. Else, if this flag is false, any config_setting without an explicit visibility attribute is //visibility:public. If this flag is true, config_setting follows the same visibility logic as all other rules. See https://github.com/bazelbuild/bazel/issues/12933.
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_disallow_legacy_py_provider default: "true"
No-op, will be removed soon.
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enforce_config_setting_visibility default: "false"
If true, enforce config_setting visibility restrictions. If false, every config_setting is visible to every target. See https://github.com/bazelbuild/bazel/issues/12932.
Tags: loading_and_analysis , incompatible_change
Options that govern the behavior of the test environment or test runner:
--[no]allow_analysis_failures default: "false"
If true, an analysis failure of a rule target results in the target's propagation of an instance of AnalysisFailureInfo containing the error description, instead of resulting in a build failure.
Tags: loading_and_analysis , experimental
--analysis_testing_deps_limit =<an integer> default: "2000"
Sets the maximum number of transitive dependencies through a rule attribute with a for_analysis_testing configuration transition. Exceeding this limit will result in a rule error.
Tags: loading_and_analysis
--[no]break_build_on_parallel_dex2oat_failure default: "false"
If true dex2oat action failures will cause the build to break instead of executing dex2oat during test runtime.
Tags: loading_and_analysis , experimental
--[no]check_tests_up_to_date default: "false"
Don't run tests, just check if they are up-to-date. If all tests results are up-to-date, the testing completes successfully. If any test needs to be built or executed, an error is reported and the testing fails. This option implies --check_up_to_date behavior.
Tags: execution
--[no]experimental_android_use_parallel_dex2oat default: "false"
Use dex2oat in parallel to possibly speed up android_test.
Tags: loading_and_analysis , host_machine_resource_optimizations , experimental
--flaky_test_attempts =<a positive integer, the string "default", or test_regex@attempts. This flag may be passed more than once> multiple uses are accumulated
Each test will be retried up to the specified number of times in case of any test failure. Tests that required more than one attempt to pass are marked as 'FLAKY' in the test summary. Normally the value specified is just an integer or the string 'default'. If an integer, then all tests will be run up to N times. If 'default', then only a single test attempt will be made for regular tests and three for tests marked explicitly as flaky by their rule (flaky=1 attribute). Alternate syntax: regex_filter@flaky_test_attempts. Where flaky_test_attempts is as above and regex_filter stands for a list of include and exclude regular expression patterns (Also see --runs_per_test). Example: --flaky_test_attempts=//foo/.*,-//foo/bar/.*@3 deflakes all tests in //foo/ except those under foo/bar three times. This option can be passed multiple times. The most recently passed argument that matches takes precedence. If nothing matches, behavior is as if 'default' above.
Tags: execution
--[no]ios_memleaks default: "false"
Enable checking for memory leaks in ios_test targets.
Tags: action_command_lines
--ios_simulator_device =<a string> default: see description
The device to simulate when running an iOS application in the simulator, eg 'iPhone 6'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.
Tags: test_runner
--ios_simulator_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
The version of iOS to run on the simulator when running or testing. This is ignored for ios_test rules if a target device is specified in the rule.
Tags: test_runner
--local_test_jobs =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> default: "auto"
The max number of local test jobs to run concurrently. Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". 0 means local resources will limit the number of local test jobs to run concurrently instead. Setting this greater than the value for --jobs is ineffectual.
Tags: execution
--runs_per_test =<a positive integer or test_regex@runs. This flag may be passed more than once> multiple uses are accumulated
Specifies number of times to run each test. If any of those attempts fail for any reason, the whole test is considered failed. Normally the value specified is just an integer. Example: --runs_per_test=3 will run all tests 3 times. Alternate syntax: regex_filter@runs_per_test. Where runs_per_test stands for an integer value and regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). Example: --runs_per_test=//foo/.*,-//foo/bar/.*@3 runs all tests in //foo/ except those under foo/bar three times. This option can be passed multiple times. The most recently passed argument that matches takes precedence. If nothing matches, the test is only run once.
--test_env =<a 'name=value' assignment with an optional value part> multiple uses are accumulated
Specifies additional environment variables to be injected into the test runner environment. Variables can be either specified by name, in which case its value will be read from the Bazel client environment, or by the name=value pair. This option can be used multiple times to specify several variables. Used only by the 'bazel test' command.
Tags: test_runner
--[no]test_keep_going default: "true"
When disabled, any non-passing test will cause the entire build to stop. By default all tests are run, even if some do not pass.
Tags: execution
--test_strategy =<a string> default: ""
Specifies which strategy to use when running tests.
Tags: execution
--test_timeout =<a single integer or comma-separated list of 4 integers> default: "-1"
Override the default test timeout values for test timeouts (in secs). If a single positive integer value is specified it will override all categories. If 4 comma-separated integers are specified, they will override the timeouts for short, moderate, long and eternal (in that order). In either form, a value of -1 tells blaze to use its default timeouts for that category.
--test_tmpdir =<a path> default: see description
Specifies the base temporary directory for 'bazel test' to use.
--tvos_simulator_device =<a string> default: see description
The device to simulate when running an tvOS application in the simulator, eg 'Apple TV 1080p'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.
Tags: test_runner
--tvos_simulator_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
The version of tvOS to run on the simulator when running or testing.
Tags: test_runner
--watchos_simulator_device =<a string> default: see description
The device to simulate when running an watchOS application in the simulator, eg 'Apple Watch - 38mm'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.
Tags: test_runner
--watchos_simulator_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
The version of watchOS to run on the simulator when running or testing.
Tags: test_runner
--[no]zip_undeclared_test_outputs default: "true"
If true, undeclared test outputs will be archived in a zip file.
Tags: test_runner
Options that trigger optimizations of the build time:
--[no]collapse_duplicate_defines default: "false"
When enabled, redundant --defines will be removed early in the build. This avoids unnecessary loss of the analysis cache for certain types of equivalent builds.
Tags: loading_and_analysis , loses_incremental_state
--[no]experimental_filter_library_jar_with_program_jar default: "false"
Filter the ProGuard ProgramJar to remove any classes also present in the LibraryJar.
Tags: action_command_lines
--[no]experimental_inmemory_dotd_files default: "false"
If enabled, C++ .d files will be passed through in memory directly from the remote build nodes instead of being written to disk.
Tags: loading_and_analysis , execution , affects_outputs , experimental
--[no]experimental_inmemory_jdeps_files default: "false"
If enabled, the dependency (.jdeps) files generated from Java compilations will be passed through in memory directly from the remote build nodes instead of being written to disk.
Tags: loading_and_analysis , execution , affects_outputs , experimental
--[no]experimental_objc_include_scanning default: "false"
Whether to perform include scanning for objective C/C++.
Tags: loading_and_analysis , execution , changes_inputs
--[no]experimental_parse_headers_skipped_if_corresponding_srcs_found default: "false"
If enabled, the parse_headers feature does not create a separate header compile action if a source with the same basename is found in the same target.
Tags: loading_and_analysis , affects_outputs
--[no]experimental_retain_test_configuration_across_testonly default: "false"
When enabled, --trim_test_configuration will not trim the test configuration for rules marked testonly=1. This is meant to reduce action conflict issues when non-test rules depend on cc_test rules. No effect if --trim_test_configuration is false.
Tags: loading_and_analysis , loses_incremental_state
--[no]experimental_starlark_cc_import default: "false"
If enabled, the Starlark version of cc_import can be used.
Tags: loading_and_analysis , experimental
--[no]experimental_unsupported_and_brittle_include_scanning default: "false"
Whether to narrow inputs to C/C++ compilation by parsing #include lines from input files. This can improve performance and incrementality by decreasing the size of compilation input trees. However, it can also break builds because the include scanner does not fully implement C preprocessor semantics. In particular, it does not understand dynamic #include directives and ignores preprocessor conditional logic. Use at your own risk. Any issues relating to this flag that are filed will be closed.
Tags: loading_and_analysis , execution , changes_inputs
--[no]incremental_dexing default: "true"
Does most of the work for dexing separately for each Jar file.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]objc_use_dotd_pruning default: "true"
If set, .d files emitted by clang will be used to prune the set of inputs passed into objc compiles.
Tags: changes_inputs , loading_and_analysis
--[no]process_headers_in_dependencies default: "false"
When building a target //a:a, process headers in all targets that //a:a depends on (if header processing is enabled for the toolchain).
Tags: execution
--[no]trim_test_configuration default: "true"
When enabled, test-related options will be cleared below the top level of the build. When this flag is active, tests cannot be built as dependencies of non-test rules, but changes to test-related options will not cause non-test rules to be re-analyzed.
Tags: loading_and_analysis , loses_incremental_state
--[no]use_singlejar_apkbuilder default: "true"
This option is a deprecated. It is now a no-op and will be removed soon.
Tags: loading_and_analysis
Options that affect the verbosity, format or location of logging:
--[no]announce default: "false"
অবচয়। No-op.
Tags: affects_outputs
--[no]experimental_bep_target_summary default: "false"
Whether to publish TargetSummary events.
--[no]experimental_build_event_expand_filesets default: "false"
If true, expand Filesets in the BEP when presenting output files.
Tags: affects_outputs
If true, fully resolve relative Fileset symlinks in the BEP when presenting output files. Requires --experimental_build_event_expand_filesets.
Tags: affects_outputs
--experimental_build_event_upload_strategy =<a string> default: see description
Selects how to upload artifacts referenced in the build event protocol.
Tags: affects_outputs
--[no]experimental_materialize_param_files_directly default: "false"
If materializing param files, do so with direct writes to disk.
Tags: execution
--[no]experimental_stream_log_file_uploads default: "false"
Stream log file uploads directly to the remote storage rather than writing them to disk.
Tags: affects_outputs
--explain =<a path> default: see description
Causes the build system to explain each executed step of the build. The explanation is written to the specified log file.
Tags: affects_outputs
--[no]legacy_important_outputs default: "true"
Use this to suppress generation of the legacy important_outputs field in the TargetComplete event. important_outputs are required for Bazel to ResultStore integration.
Tags: affects_outputs
--[no]materialize_param_files default: "false"
Writes intermediate parameter files to output tree even when using remote action execution. Useful when debugging actions. This is implied by --subcommands and --verbose_failures.
Tags: execution
--max_config_changes_to_show =<an integer> default: "3"
When discarding the analysis cache due to a change in the build options, displays up to the given number of changed option names. If the number given is -1, all changed options will be displayed.
Tags: terminal_output
--max_test_output_bytes =<an integer> default: "-1"
Specifies maximum per-test-log size that can be emitted when --test_output is 'errors' or 'all'. Useful for avoiding overwhelming the output with excessively noisy test output. The test header is included in the log size. Negative values imply no limit. Output is all or nothing.
Tags: test_runner , terminal_output , execution
--output_filter =<a valid Java regular expression> default: see description
Only shows warnings for rules with a name matching the provided regular expression.
Tags: affects_outputs
--progress_report_interval =<an integer in 0-3600 range> default: "0"
The number of seconds to wait between two reports on still running jobs. The default value 0 means to use the default 10:30:60 incremental algorithm.
Tags: affects_outputs
--show_result =<an integer> default: "1"
Show the results of the build. For each target, state whether or not it was brought up-to-date, and if so, a list of output files that were built. The printed files are convenient strings for copy+pasting to the shell, to execute them. This option requires an integer argument, which is the threshold number of targets above which result information is not printed. Thus zero causes suppression of the message and MAX_INT causes printing of the result to occur always. The default is one.
Tags: affects_outputs
--[no]subcommands [ -s ] default: "false"
Display the subcommands executed during a build. Related flags: --execution_log_json_file, --execution_log_binary_file (for logging subcommands to a file in a tool-friendly format).
Tags: terminal_output
--test_output =<summary, errors, all or streamed> default: "summary"
Specifies desired output mode. Valid values are 'summary' to output only test status summary, 'errors' to also print test logs for failed tests, 'all' to print logs for all tests and 'streamed' to output logs for all tests in real time (this will force tests to be executed locally one at a time regardless of --test_strategy value).
Tags: test_runner , terminal_output , execution
--test_summary =<short, terse, detailed, none or testcase> default: "short"
Specifies the desired format of the test summary. Valid values are 'short' to print information only about tests executed, 'terse', to print information only about unsuccessful tests that were run, 'detailed' to print detailed information about failed test cases, 'testcase' to print summary in test case resolution, do not print detailed information about failed test cases and 'none' to omit the summary.
Tags: terminal_output
--toolchain_resolution_debug =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths> default: "-.*"
Print debug information during toolchain resolution. The flag takes a regex, which is checked against toolchain types and specific targets to see which to debug. Multiple regexes may be separated by commas, and then each regex is checked separately. Note: The output of this flag is very complex and will likely only be useful to experts in toolchain resolution.
Tags: terminal_output
--[no]verbose_explanations default: "false"
Increases the verbosity of the explanations issued if --explain is enabled. Has no effect if --explain is not enabled.
Tags: affects_outputs
--[no]verbose_failures default: "false"
If a command fails, print out the full command line.
Tags: terminal_output
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--aspects_parameters =<a 'name=value' assignment> multiple uses are accumulated
Specifies the values of the command-line aspects parameters. Each parameter value is specified via <param_name>=<param_value>, for example 'my_param=my_val' where 'my_param' is a parameter of some aspect in --aspects list or required by an aspect in the list. This option can be used multiple times. However, it is not allowed to assign values to the same parameter more than once.
Tags: loading_and_analysis
--flag_alias =<a 'name=value' flag alias> multiple uses are accumulated
Sets a shorthand name for a Starlark flag. It takes a single key-value pair in the form "<key>=<value>" as an argument.
Tags: changes_inputs
--[no]incompatible_default_to_explicit_init_py default: "false"
This flag changes the default behavior so that __init__.py files are no longer automatically created in the runfiles of Python targets. Precisely, when a py_binary or py_test target has legacy_create_init set to "auto" (the default), it is treated as false if and only if this flag is set. See https://github.com/bazelbuild/bazel/issues/10076.
Tags: affects_outputs , incompatible_change
--[no]incompatible_py2_outputs_are_suffixed default: "true"
If true, targets built in the Python 2 configuration will appear under an output root that includes the suffix '-py2', while targets built for Python 3 will appear in a root with no Python-related suffix. This means that the `bazel-bin` convenience symlink will point to Python 3 targets rather than Python 2. If you enable this option it is also recommended to enable `--incompatible_py3_is_default`.
Tags: affects_outputs , incompatible_change
--[no]incompatible_py3_is_default default: "true"
If true, `py_binary` and `py_test` targets that do not set their `python_version` (or `default_python_version`) attribute will default to PY3 rather than to PY2. If you set this flag it is also recommended to set `--incompatible_py2_outputs_are_suffixed`.
Tags: loading_and_analysis , affects_outputs , incompatible_change
--[no]incompatible_use_python_toolchains default: "true"
If set to true, executable native Python rules will use the Python runtime specified by the Python toolchain, rather than the runtime given by legacy flags like --python_top.
Tags: loading_and_analysis , incompatible_change
--python_version =<PY2 or PY3> default: see description
The Python major version mode, either `PY2` or `PY3`. Note that this is overridden by `py_binary` and `py_test` targets (even if they don't explicitly specify a version) so there is usually not much reason to supply this flag.
Tags: loading_and_analysis , affects_outputs , explicit_in_output_path
--target_pattern_file =<a string> default: ""
If set, build will read patterns from the file named here, rather than on the command line. It is an error to specify a file here as well as command-line patterns.
Tags: changes_inputs
Miscellaneous options, not otherwise categorized.:
--[no]build_manual_tests default: "false"
Forces test targets tagged 'manual' to be built. 'manual' tests are excluded from processing. This option forces them to be built (but not executed).
--build_tag_filters =<comma-separated list of options> default: ""
Specifies a comma-separated list of tags. Each tag can be optionally preceded with '-' to specify excluded tags. Only those targets will be built that contain at least one included tag and do not contain any excluded tags. This option does not affect the set of tests executed with the 'test' command; those are be governed by the test filtering options, for example '--test_tag_filters'
--[no]build_tests_only default: "false"
If specified, only *_test and test_suite rules will be built and other targets specified on the command line will be ignored. By default everything that was requested will be built.
--[no]cache_test_results [ -t ] default: "auto"
If set to 'auto', Bazel reruns a test if and only if: (1) Bazel detects changes in the test or its dependencies, (2) the test is marked as external, (3) multiple test runs were requested with --runs_per_test, or(4) the test previously failed. If set to 'yes', Bazel caches all test results except for tests marked as external. If set to 'no', Bazel does not cache any test results.
--[no]compile_one_dependency default: "false"
Compile a single dependency of the argument files. This is useful for syntax checking source files in IDEs, for example, by rebuilding a single target that depends on the source file to detect errors as early as possible in the edit/build/test cycle. This argument affects the way all non-flag arguments are interpreted; instead of being targets to build they are source filenames. For each source filename an arbitrary target that depends on it will be built.
--deleted_packages =<comma-separated list of package names> default: ""
A comma-separated list of names of packages which the build system will consider non-existent, even if they are visible somewhere on the package path. Use this option when deleting a subpackage 'x/y' of an existing package 'x'. For example, after deleting x/y/BUILD in your client, the build system may complain if it encounters a label '//x:y/z' if that is still provided by another package_path entry. Specifying --deleted_packages x/y avoids this problem.
--[no]discard_analysis_cache default: "false"
Discard the analysis cache immediately after the analysis phase completes. Reduces memory usage by ~10%, but makes further incremental builds slower.
--execution_log_binary_file =<a path> default: see description
Log the executed spawns into this file as delimited Spawn protos, according to src/main/protobuf/spawn.proto. The log is first written unordered and is then, at the end of the invocation, sorted in a stable order (can be CPU and memory intensive). Related flags: --execution_log_json_file (ordered text json format), --experimental_execution_log_file (unordered binary protobuf format), --subcommands (for displaying subcommands in terminal output).
--execution_log_json_file =<a path> default: see description
Log the executed spawns into this file as json representation of the delimited Spawn protos, according to src/main/protobuf/spawn.proto. The log is first written unordered and is then, at the end of the invocation, sorted in a stable order (can be CPU and memory intensive). Related flags: Related flags: --execution_log_binary_file (ordered binary protobuf format), --experimental_execution_log_file (unordered binary protobuf format), --subcommands (for displaying subcommands in terminal output).
--[no]expand_test_suites default: "true"
Expand test_suite targets into their constituent tests before analysis. When this flag is turned on (the default), negative target patterns will apply to the tests belonging to the test suite, otherwise they will not. Turning off this flag is useful when top-level aspects are applied at command line: then they can analyze test_suite targets.
Tags: loading_and_analysis
--[no]experimental_cancel_concurrent_tests default: "false"
If true, then Blaze will cancel concurrently running tests on the first successful run. This is only useful in combination with --runs_per_test_detects_flakes.
Tags: affects_outputs , loading_and_analysis
--experimental_execution_log_file =<a path> default: see description
Log the executed spawns into this file as delimited Spawn protos, according to src/main/protobuf/spawn.proto. This file is written in order of the execution of the Spawns. Related flags: --execution_log_binary_file (ordered binary protobuf format), --execution_log_json_file (ordered text json format), --subcommands (for displaying subcommands in terminal output).
--[no]experimental_execution_log_spawn_metrics default: "false"
Include spawn metrics in the executed spawns log.
--experimental_extra_action_filter =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths> default: ""
Deprecated in favor of aspects. Filters set of targets to schedule extra_actions for.
--[no]experimental_extra_action_top_level_only default: "false"
Deprecated in favor of aspects. Only schedules extra_actions for top level targets.
--[no]experimental_fetch_all_coverage_outputs default: "false"
If true, then Bazel fetches the entire coverage data directory for each test during a coverage run.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_generate_llvm_lcov default: "false"
If true, coverage for clang will generate an LCOV report.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_j2objc_header_map default: "true"
Whether to generate J2ObjC header map in parallel of J2ObjC transpilation.
--[no]experimental_j2objc_shorter_header_path default: "false"
Whether to generate with shorter header path (uses "_ios" instead of "_j2objc").
Tags: affects_outputs
--experimental_java_classpath =<off, javabuilder or bazel> default: "javabuilder"
Enables reduced classpaths for Java compilations.
--[no]experimental_limit_android_lint_to_android_constrained_java default: "false"
Limit --experimental_run_android_lint_on_java_rules to Android-compatible libraries.
Tags: affects_outputs
--[no]experimental_prioritize_local_actions default: "true"
If set, actions that can only run locally are given first chance at acquiring resources, dynamically run workers get second chance, and dynamically-run standalone actions come last.
Tags: execution
--[no]experimental_run_android_lint_on_java_rules default: "false"
Whether to validate java_* sources.
Tags: affects_outputs
--[no]explicit_java_test_deps default: "false"
Explicitly specify a dependency to JUnit or Hamcrest in a java_test instead of accidentally obtaining from the TestRunner's deps. Only works for bazel right now.
--host_java_launcher =<a build target label> default: see description
The Java launcher used by tools that are executed during a build.
--host_javacopt =<a string> multiple uses are accumulated
Additional options to pass to javac when building tools that are executed during a build.
--host_jvmopt =<a string> multiple uses are accumulated
Additional options to pass to the Java VM when building tools that are executed during the build. These options will get added to the VM startup options of each java_binary target.
--[no]incompatible_exclusive_test_sandboxed default: "false"
If true, exclusive tests will run with sandboxed strategy. Add 'local' tag to force an exclusive test run locally
Tags: incompatible_change
--[no]incompatible_strict_action_env default: "false"
If true, Bazel uses an environment with a static value for PATH and does not inherit LD_LIBRARY_PATH. Use --action_env=ENV_VARIABLE if you want to inherit specific environment variables from the client, but note that doing so can prevent cross-user caching if a shared cache is used.
Tags: loading_and_analysis , incompatible_change
--j2objc_translation_flags =<comma-separated list of options> multiple uses are accumulated
Additional options to pass to the J2ObjC tool.
--java_debug
Causes the Java virtual machine of a java test to wait for a connection from a JDWP-compliant debugger (such as jdb) before starting the test. Implies -test_output=streamed.
Expands to:
--test_arg=--wrapper_script_flag=--debug
--test_output=streamed
--test_strategy=exclusive
--test_timeout=9999
--nocache_test_results
--[no]java_deps default: "true"
Generate dependency information (for now, compile-time classpath) per Java target.
--[no]java_header_compilation default: "true"
Compile ijars directly from source.
--java_language_version =<a string> default: "8"
The Java language version
--java_launcher =<a build target label> default: see description
The Java launcher to use when building Java binaries. If this flag is set to the empty string, the JDK launcher is used. The "launcher" attribute overrides this flag.
--java_runtime_version =<a string> default: "local_jdk"
The Java runtime version
--javacopt =<a string> multiple uses are accumulated
Additional options to pass to javac.
--jvmopt =<a string> multiple uses are accumulated
Additional options to pass to the Java VM. These options will get added to the VM startup options of each java_binary target.
--legacy_main_dex_list_generator =<a build target label> default: see description
Specifies a binary to use to generate the list of classes that must be in the main dex when compiling legacy multidex.
--local_cpu_resources =<an integer, or "HOST_CPUS", optionally followed by [-|*]<float>.> default: "HOST_CPUS"
Explicitly set the total number of local CPU cores available to Bazel to spend on build actions executed locally. Takes an integer, or "HOST_CPUS", optionally followed by [-|*]<float> (eg. HOST_CPUS*.5 to use half the available CPU cores).By default, ("HOST_CPUS"), Bazel will query system configuration to estimate the number of CPU cores available.
--local_ram_resources =<an integer, or "HOST_RAM", optionally followed by [-|*]<float>.> default: "HOST_RAM*.67"
Explicitly set the total amount of local host RAM (in MB) available to Bazel to spend on build actions executed locally. Takes an integer, or "HOST_RAM", optionally followed by [-|*]<float> (eg. HOST_RAM*.5 to use half the available RAM). By default, ("HOST_RAM*.67"), Bazel will query system configuration to estimate the amount of RAM available and will use 67% of it.
--local_termination_grace_seconds =<an integer> default: "15"
Time to wait between terminating a local process due to timeout and forcefully shutting it down.
--package_path =<colon-separated list of options> default: "%workspace%"
A colon-separated list of where to look for packages. Elements beginning with '%workspace%' are relative to the enclosing workspace. If omitted or empty, the default is the output of 'bazel info default-package-path'.
--plugin =<a build target label> multiple uses are accumulated
Plugins to use in the build. Currently works with java_plugin.
--proguard_top =<a build target label> default: see description
Specifies which version of ProGuard to use for code removal when building a Java binary.
--proto_compiler =<a build target label> default: "@com_google_protobuf//:protoc"
The label of the proto-compiler.
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_cc =<a build target label> default: "@com_google_protobuf//:cc_toolchain"
Label of proto_lang_toolchain() which describes how to compile C++ protos
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_j2objc =<a build target label> default: "@bazel_tools//tools/j2objc:j2objc_proto_toolchain"
Label of proto_lang_toolchain() which describes how to compile j2objc protos
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_java =<a build target label> default: "@com_google_protobuf//:java_toolchain"
Label of proto_lang_toolchain() which describes how to compile Java protos
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_javalite =<a build target label> default: "@com_google_protobuf//:javalite_toolchain"
Label of proto_lang_toolchain() which describes how to compile JavaLite protos
Tags: affects_outputs , loading_and_analysis
--protocopt =<a string> multiple uses are accumulated
Additional options to pass to the protobuf compiler.
Tags: affects_outputs
--[no]runs_per_test_detects_flakes default: "false"
If true, any shard in which at least one run/attempt passes and at least one run/attempt fails gets a FLAKY status.
--shell_executable =<a path> default: see description
Absolute path to the shell executable for Bazel to use. If this is unset, but the BAZEL_SH environment variable is set on the first Bazel invocation (that starts up a Bazel server), Bazel uses that. If neither is set, Bazel uses a hard-coded default path depending on the operating system it runs on (Windows: c:/tools/msys64/usr/bin/bash.exe, FreeBSD: /usr/local/bin/bash, all others: /bin/bash). Note that using a shell that is not compatible with bash may lead to build failures or runtime failures of the generated binaries.
Tags: loading_and_analysis
--[no]show_loading_progress default: "true"
If enabled, causes Bazel to print "Loading package:" messages.
--test_arg =<a string> multiple uses are accumulated
Specifies additional options and arguments that should be passed to the test executable. Can be used multiple times to specify several arguments. If multiple tests are executed, each of them will receive identical arguments. Used only by the 'bazel test' command.
--test_filter =<a string> default: see description
Specifies a filter to forward to the test framework. Used to limit the tests run. Note that this does not affect which targets are built.
--test_lang_filters =<comma-separated list of options> default: ""
Specifies a comma-separated list of test languages. Each language can be optionally preceded with '-' to specify excluded languages. Only those test targets will be found that are written in the specified languages. The name used for each language should be the same as the language prefix in the *_test rule, eg one of 'cc', 'java', 'py', etc. This option affects --build_tests_only behavior and the test command.
--test_result_expiration =<an integer> default: "-1"
This option is deprecated and has no effect.
--[no]test_runner_fail_fast default: "false"
Forwards fail fast option to the test runner. The test runner should stop execution upon first failure.
--test_sharding_strategy =<explicit or disabled> default: "explicit"
Specify strategy for test sharding: 'explicit' to only use sharding if the 'shard_count' BUILD attribute is present. 'disabled' to never use test sharding.
--test_size_filters =<comma-separated list of values: small, medium, large or enormous> default: ""
Specifies a comma-separated list of test sizes. Each size can be optionally preceded with '-' to specify excluded sizes. Only those test targets will be found that contain at least one included size and do not contain any excluded sizes. This option affects --build_tests_only behavior and the test command.
--test_tag_filters =<comma-separated list of options> default: ""
Specifies a comma-separated list of test tags. Each tag can be optionally preceded with '-' to specify excluded tags. Only those test targets will be found that contain at least one included tag and do not contain any excluded tags. This option affects --build_tests_only behavior and the test command.
--test_timeout_filters =<comma-separated list of values: short, moderate, long or eternal> default: ""
Specifies a comma-separated list of test timeouts. Each timeout can be optionally preceded with '-' to specify excluded timeouts. Only those test targets will be found that contain at least one included timeout and do not contain any excluded timeouts. This option affects --build_tests_only behavior and the test command.
--tool_java_language_version =<a string> default: "8"
The Java language version used to execute the tools that are needed during a build
--tool_java_runtime_version =<a string> default: "remotejdk_11"
The Java runtime version used to execute tools during the build
--[no]use_ijars default: "true"
If enabled, this option causes Java compilation to use interface jars. This will result in faster incremental compilation, but error messages can be different.

Canonicalize-flags Options

Inherits all options from build .

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that control the output of the command:
--[no]canonicalize_policy default: "false"
Output the canonical policy, after expansion and filtering. To keep the output clean, the canonicalized command arguments will NOT be shown when this option is set to true. Note that the command specified by --for_command affects the filtered policy, and if none is specified, the default command is 'build'.
Tags: affects_outputs , terminal_output
--[no]show_warnings default: "false"
Output parser warnings to standard error (eg for conflicting flag options).
Tags: affects_outputs , terminal_output
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
--[no]incompatible_config_setting_private_default_visibility default: "false"
If incompatible_enforce_config_setting_visibility=false, this is a noop. Else, if this flag is false, any config_setting without an explicit visibility attribute is //visibility:public. If this flag is true, config_setting follows the same visibility logic as all other rules. See https://github.com/bazelbuild/bazel/issues/12933.
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enforce_config_setting_visibility default: "false"
If true, enforce config_setting visibility restrictions. If false, every config_setting is visible to every target. See https://github.com/bazelbuild/bazel/issues/12932.
Tags: loading_and_analysis , incompatible_change
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
--for_command =<a string> default: "build"
The command for which the options should be canonicalized.
Tags: affects_outputs , terminal_output
--invocation_policy =<a string> default: ""
Applies an invocation policy to the options to be canonicalized.
Tags: affects_outputs , terminal_output
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--deleted_packages =<comma-separated list of package names> default: ""
A comma-separated list of names of packages which the build system will consider non-existent, even if they are visible somewhere on the package path. Use this option when deleting a subpackage 'x/y' of an existing package 'x'. For example, after deleting x/y/BUILD in your client, the build system may complain if it encounters a label '//x:y/z' if that is still provided by another package_path entry. Specifying --deleted_packages x/y avoids this problem.
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.
--package_path =<colon-separated list of options> default: "%workspace%"
A colon-separated list of where to look for packages. Elements beginning with '%workspace%' are relative to the enclosing workspace. If omitted or empty, the default is the output of 'bazel info default-package-path'.
--[no]show_loading_progress default: "true"
If enabled, causes Bazel to print "Loading package:" messages.

Clean Options

Inherits all options from build .

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that control the output of the command:
--[no]async default: "false"
If true, output cleaning is asynchronous. When this command completes, it will be safe to execute new commands in the same client, even though the deletion may continue in the background.
Tags: host_machine_resource_optimizations
--[no]expunge default: "false"
If true, clean removes the entire working tree for this bazel instance, which includes all bazel-created temporary and build output files, and stops the bazel server if it is running.
Tags: host_machine_resource_optimizations
--expunge_async
If specified, clean asynchronously removes the entire working tree for this bazel instance, which includes all bazel-created temporary and build output files, and stops the bazel server if it is running. When this command completes, it will be safe to execute new commands in the same client, even though the deletion may continue in the background.
Expands to:
--expunge
--async

Tags: host_machine_resource_optimizations
If true, all symlinks in the workspace with the prefix symlink_prefix will be deleted. Without this flag, only symlinks with the predefined suffixes are cleaned.
Tags: affects_outputs
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.

Config Options

Coverage Options

Inherits all options from test .

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.

Cquery Options

Inherits all options from test .

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options relating to query output and semantics:
--aspect_deps =<off, conservative or precise> default: "conservative"
How to resolve aspect dependencies when the output format is one of {xml,proto,record}. 'off' means no aspect dependencies are resolved, 'conservative' (the default) means all declared aspect dependencies are added regardless of whether they are given the rule class of direct dependencies, 'precise' means that only those aspects are added that are possibly active given the rule class of the direct dependencies. Note that precise mode requires loading other packages to evaluate a single target thus making it slower than the other modes. Also note that even precise mode is not completely precise: the decision whether to compute an aspect is decided in the analysis phase, which is not run during 'bazel query'.
Tags: build_file_semantics
--[no]graph:factored default: "true"
If true, then the graph will be emitted 'factored', ie topologically-equivalent nodes will be merged together and their labels concatenated. This option is only applicable to --output=graph.
Tags: terminal_output
--graph:node_limit =<an integer> default: "512"
The maximum length of the label string for a graph node in the output. Longer labels will be truncated; -1 means no truncation. This option is only applicable to --output=graph.
Tags: terminal_output
--[no]implicit_deps default: "true"
If enabled, implicit dependencies will be included in the dependency graph over which the query operates. An implicit dependency is one that is not explicitly specified in the BUILD file but added by bazel. For cquery, this option controls filtering resolved toolchains.
Tags: build_file_semantics
--[no]include_aspects default: "true"
aquery, cquery: whether to include aspect-generated actions in the output. query: no-op (aspects are always followed).
Tags: terminal_output
--[no]incompatible_display_source_file_location default: "true"
True by default, displays the target of the source file. If true, displays the location of line 1 of source files in location outputs. This flag only exists for migration purposes.
Tags: terminal_output , incompatible_change
--[no]infer_universe_scope default: "false"
If set and --universe_scope is unset, then a value of --universe_scope will be inferred as the list of unique target patterns in the query expression. Note that the --universe_scope value inferred for a query expression that uses universe-scoped functions (eg`allrdeps`) may not be what you want, so you should use this option only if you know what you are doing. See https://bazel.build/reference/query#sky-query for details and examples. If --universe_scope is set, then this option's value is ignored. Note: this option applies only to `query` (ie not `cquery`).
Tags: loading_and_analysis
--[no]line_terminator_null default: "false"
Whether each format is terminated with \0 instead of newline.
Tags: terminal_output
--[no]nodep_deps default: "true"
If enabled, deps from "nodep" attributes will be included in the dependency graph over which the query operates. A common example of a "nodep" attribute is "visibility". Run and parse the output of `info build-language` to learn about all the "nodep" attributes in the build language.
Tags: build_file_semantics
--output =<a string> default: "label"
The format in which the cquery results should be printed. Allowed values for cquery are: label, label_kind, textproto, transitions, proto, jsonproto. If you select 'transitions', you also have to specify the --transitions=(lite|full) option.
Tags: terminal_output
--[no]proto:default_values default: "true"
If true, attributes whose value is not explicitly specified in the BUILD file are included; otherwise they are omitted. This option is applicable to --output=proto
Tags: terminal_output
--[no]proto:definition_stack default: "false"
Populate the definition_stack proto field, which records for each rule instance the Starlark call stack at the moment the rule's class was defined.
Tags: terminal_output
--[no]proto:flatten_selects default: "true"
If enabled, configurable attributes created by select() are flattened. For list types the flattened representation is a list containing each value of the select map exactly once. Scalar types are flattened to null.
Tags: build_file_semantics
--[no]proto:include_configurations default: "true"
if enabled, proto output will include information about configurations. When disabled,cquery proto output format resembles query output format.
Tags: affects_outputs
--[no]proto:include_synthetic_attribute_hash default: "false"
Whether or not to calculate and populate the $internal_attr_hash attribute.
Tags: terminal_output
--[no]proto:instantiation_stack default: "false"
Populate the instantiation call stack of each rule. Note that this requires the stack to be present
Tags: terminal_output
--[no]proto:locations default: "true"
Whether to output location information in proto output at all.
Tags: terminal_output
--proto:output_rule_attrs =<comma-separated list of options> default: "all"
Comma separated list of attributes to include in output. Defaults to all attributes. Set to empty string to not output any attribute. This option is applicable to --output=proto.
Tags: terminal_output
--[no]proto:rule_inputs_and_outputs default: "true"
Whether or not to populate the rule_input and rule_output fields.
Tags: terminal_output
--[no]relative_locations default: "false"
If true, the location of BUILD files in xml and proto outputs will be relative. By default, the location output is an absolute path and will not be consistent across machines. You can set this option to true to have a consistent result across machines.
Tags: terminal_output
--show_config_fragments =<off, direct or transitive> default: "off"
Shows the configuration fragments required by a rule and its transitive dependencies. This can be useful for evaluating how much a configured target graph can be trimmed.
Tags: affects_outputs
--starlark:expr =<a string> default: ""
A Starlark expression to format each configured target in cquery's --output=starlark mode. The configured target is bound to 'target'. If neither --starlark:expr nor --starlark:file is specified, this option will default to 'str(target.label)'. It is an error to specify both --starlark:expr and --starlark:file.
Tags: terminal_output
--starlark:file =<a string> default: ""
The name of a file that defines a Starlark function called 'format', of one argument, that is applied to each configured target to format it as a string. It is an error to specify both --starlark:expr and --starlark:file. See help for --output=starlark for additional detail.
Tags: terminal_output
--[no]tool_deps default: "true"
Query: If disabled, dependencies on 'host configuration' or 'execution' targets will not be included in the dependency graph over which the query operates. A 'host configuration' dependency edge, such as the one from any 'proto_library' rule to the Protocol Compiler, usually points to a tool executed during the build rather than a part of the same 'target' program. Cquery: If disabled, filters out all configured targets which cross a host or execution transition from the top-level target that discovered this configured target. That means if the top-level target is in the target configuration, only configured targets also in the target configuration will be returned. If the top-level target is in the host configuration, only host configured targets will be returned. This option will NOT exclude resolved toolchains.
Tags: build_file_semantics
--transitions =<full, lite or none> default: "none"
The format in which cquery will print transition information.
Tags: affects_outputs
--universe_scope =<comma-separated list of options> default: ""
A comma-separated set of target patterns (additive and subtractive). The query may be performed in the universe defined by the transitive closure of the specified targets. This option is used for the query and cquery commands. For cquery, the input to this option is the targets all answers are built under and so this option may affect configurations and transitions. If this option is not specified, the top-level targets are assumed to be the targets parsed from the query expression. Note: For cquery, not specifying this option may cause the build to break if targets parsed from the query expression are not buildable with top-level options.
Tags: loading_and_analysis
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.
Options that control build execution:
Whether to make direct file system calls to create symlink trees
Tags: loading_and_analysis , execution , experimental
--[no]experimental_remotable_source_manifests default: "false"
Whether to make source manifest actions remotable
Tags: loading_and_analysis , execution , experimental
--[no]experimental_split_coverage_postprocessing default: "false"
If true, then Bazel will run coverage postprocessing for test in a new spawn.
Tags: execution
--[no]experimental_strict_fileset_output default: "false"
If this option is enabled, filesets will treat all output artifacts as regular files. They will not traverse directories or be sensitive to symlinks.
Tags: execution
--modify_execution_info =<regex=[+-]key,regex=[+-]key,...> default: ""
Add or remove keys from an action's execution info based on action mnemonic. Applies only to actions which support execution info. Many common actions support execution info, eg Genrule, CppCompile, Javac, StarlarkAction, TestRunner. When specifying multiple values, order matters because many regexes may apply to the same mnemonic. Syntax: "regex=[+-]key,regex=[+-]key,...". Examples: '.*=+x,.*=-y,.*=+z' adds 'x' and 'z' to, and removes 'y' from, the execution info for all actions. 'Genrule=+requires-x' adds 'requires-x' to the execution info for all Genrule actions. '(?!Genrule).*=-requires-x' removes 'requires-x' from the execution info for all non-Genrule actions.
Tags: execution , affects_outputs , loading_and_analysis
--persistent_android_resource_processor
Enable the persistent Android resource processor by using workers.
Expands to:
--internal_persistent_busybox_tools
--strategy=AaptPackage=worker
--strategy=AndroidResourceParser=worker
--strategy=AndroidResourceValidator=worker
--strategy=AndroidResourceCompiler=worker
--strategy=RClassGenerator=worker
--strategy=AndroidResourceLink=worker
--strategy=AndroidAapt2=worker
--strategy=AndroidAssetMerger=worker
--strategy=AndroidResourceMerger=worker
--strategy=AndroidCompiledResourceMerger=worker
--strategy=ManifestMerger=worker
--strategy=AndroidManifestMerger=worker
--strategy=Aapt2Optimize=worker
--strategy=AARGenerator=worker

Tags: host_machine_resource_optimizations , execution
Options that configure the toolchain used for action execution:
--android_compiler =<a string> default: see description
The Android target compiler.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--android_crosstool_top =<a build target label> default: "//external:android/crosstool"
The location of the C++ compiler used for Android builds.
Tags: affects_outputs , changes_inputs , loading_and_analysis , loses_incremental_state
--android_grte_top =<a label> default: see description
The Android target grte_top.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--android_manifest_merger =<legacy, android or force_android> default: "android"
Selects the manifest merger to use for android_binary rules. Flag to help thetransition to the Android manifest merger from the legacy merger.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--android_platforms =<a build target label> default: ""
Sets the platforms that android_binary targets use. If multiple platforms are specified, then the binary is a fat APKs, which contains native binaries for each specified target platform.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--android_sdk =<a build target label> default: "@bazel_tools//tools/android:sdk"
Specifies Android SDK/platform that is used to build Android applications.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--apple_compiler =<a string> default: see description
The Apple target compiler. Useful for selecting variants of a toolchain (eg xcode-beta).
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--apple_crosstool_top =<a build target label> default: "@bazel_tools//tools/cpp:toolchain"
The label of the crosstool package to be used in Apple and Objc rules and their dependencies.
Tags: loses_incremental_state , changes_inputs
--apple_grte_top =<a build target label> default: see description
The Apple target grte_top.
Tags: changes_inputs , loading_and_analysis , loses_incremental_state
--cc_output_directory_tag =<a string> default: ""
Specifies a suffix to be added to the configuration directory.
Tags: affects_outputs , explicit_in_output_path
--compiler =<a string> default: see description
The C++ compiler to use for compiling the target.
Tags: loading_and_analysis , execution
--coverage_output_generator =<a build target label> default: "@bazel_tools//tools/test:lcov_merger"
Location of the binary that is used to postprocess raw coverage reports. This must currently be a filegroup that contains a single file, the binary. Defaults to '//tools/test:lcov_merger'.
Tags: changes_inputs , affects_outputs , loading_and_analysis
--coverage_report_generator =<a build target label> default: "@bazel_tools//tools/test:coverage_report_generator"
Location of the binary that is used to generate coverage reports. This must currently be a filegroup that contains a single file, the binary. Defaults to '//tools/test:coverage_report_generator'.
Tags: changes_inputs , affects_outputs , loading_and_analysis
--coverage_support =<a build target label> default: "@bazel_tools//tools/test:coverage_support"
Location of support files that are required on the inputs of every test action that collects code coverage. Defaults to '//tools/test:coverage_support'.
Tags: changes_inputs , affects_outputs , loading_and_analysis
--crosstool_top =<a build target label> default: "@bazel_tools//tools/cpp:toolchain"
The label of the crosstool package to be used for compiling C++ code.
Tags: loading_and_analysis , changes_inputs , affects_outputs
--custom_malloc =<a build target label> default: see description
Specifies a custom malloc implementation. This setting overrides malloc attributes in build rules.
Tags: changes_inputs , affects_outputs
--experimental_add_exec_constraints_to_targets =<a '<RegexFilter>=<label1>[,<label2>,...]' assignment> multiple uses are accumulated
List of comma-separated regular expressions, each optionally prefixed by - (negative expression), assigned (=) to a list of comma-separated constraint value targets. If a target matches no negative expression and at least one positive expression its toolchain resolution will be performed as if it had declared the constraint values as execution constraints. Example: //demo,-test=@platforms//cpus:x86_64 will add 'x86_64' to any target under //demo except for those whose name contains 'test'.
Tags: loading_and_analysis
--[no]experimental_enable_objc_cc_deps default: "true"
Allows objc_* rules to depend on cc_library and causes any objc dependencies to be built with --cpu set to "ios_<--ios_cpu>" for any values in --ios_multi_cpu.
Tags: loading_and_analysis , incompatible_change
--[no]experimental_include_xcode_execution_requirements default: "false"
If set, add a "requires-xcode:{version}" execution requirement to every Xcode action. If the xcode version has a hyphenated label, also add a "requires-xcode-label:{version_label}" execution requirement.
Tags: loses_incremental_state , loading_and_analysis , execution
--[no]experimental_prefer_mutual_xcode default: "true"
If true, use the most recent Xcode that is available both locally and remotely. If false, or if there are no mutual available versions, use the local Xcode version selected via xcode-select.
Tags: loses_incremental_state
--extra_execution_platforms =<comma-separated list of options> multiple uses are accumulated
The platforms that are available as execution platforms to run actions. Platforms can be specified by exact target, or as a target pattern. These platforms will be considered before those declared in the WORKSPACE file by register_execution_platforms().
Tags: execution
--extra_toolchains =<comma-separated list of options> multiple uses are accumulated
The toolchain rules to be considered during toolchain resolution. Toolchains can be specified by exact target, or as a target pattern. These toolchains will be considered before those declared in the WORKSPACE file by register_toolchains().
Tags: affects_outputs , changes_inputs , loading_and_analysis
--grte_top =<a label> default: see description
A label to a checked-in libc library. The default value is selected by the crosstool toolchain, and you almost never need to override it.
Tags: action_command_lines , affects_outputs
--host_compiler =<a string> default: see description
The C++ compiler to use for host compilation. It is ignored if --host_crosstool_top is not set.
Tags: loading_and_analysis , execution
--host_crosstool_top =<a build target label> default: see description
By default, the --crosstool_top and --compiler options are also used for the host configuration. If this flag is provided, Bazel uses the default libc and compiler for the given crosstool_top.
Tags: loading_and_analysis , changes_inputs , affects_outputs
--host_grte_top =<a label> default: see description
If specified, this setting overrides the libc top-level directory (--grte_top) for the host configuration.
Tags: action_command_lines , affects_outputs
--host_platform =<a build target label> default: ""
The label of a platform rule that describes the host system.
Tags: affects_outputs , changes_inputs , loading_and_analysis
--[no]incompatible_disable_expand_if_all_available_in_flag_set default: "true"
If true, Bazel will not allow specifying expand_if_all_available in flag_sets(see https://github.com/bazelbuild/bazel/issues/7008 for migration instructions).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_dont_enable_host_nonhost_crosstool_features default: "true"
If true, Bazel will not enable 'host' and 'nonhost' features in the c++ toolchain (see https://github.com/bazelbuild/bazel/issues/7407 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enable_android_toolchain_resolution default: "false"
Use toolchain resolution to select the Android SDK for android rules (Starlark and native)
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enable_apple_toolchain_resolution default: "false"
Use toolchain resolution to select the Apple SDK for apple rules (Starlark and native)
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_make_thinlto_command_lines_standalone default: "true"
If true, Bazel will not reuse C++ link action command lines for lto indexing command lines (see https://github.com/bazelbuild/bazel/issues/6791 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_remove_cpu_and_compiler_attributes_from_cc_toolchain default: "true"
If true, Bazel will complain when cc_toolchain.cpu and cc_toolchain.compiler attributes are set (see https://github.com/bazelbuild/bazel/issues/7075 for migration instructions).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_remove_legacy_whole_archive default: "true"
If true, Bazel will not link library dependencies as whole archive by default (see https://github.com/bazelbuild/bazel/issues/7362 for migration instructions).
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_require_ctx_in_configure_features default: "true"
If true, Bazel will require 'ctx' parameter in to cc_common.configure_features (see https://github.com/bazelbuild/bazel/issues/7793 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]interface_shared_objects default: "true"
Use interface shared objects if supported by the toolchain. All ELF toolchains currently support this setting.
Tags: loading_and_analysis , affects_outputs , affects_outputs
--ios_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the iOS SDK to use to build iOS applications. If unspecified, uses default iOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--macos_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the macOS SDK to use to build macOS applications. If unspecified, uses default macOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--minimum_os_version =<a string> default: see description
The minimum OS version which your compilation targets.
Tags: loading_and_analysis , affects_outputs
--platform_mappings =<a relative path> default: ""
The location of a mapping file that describes which platform to use if none is set or which flags to set when a platform already exists. Must be relative to the main workspace root. Defaults to 'platform_mappings' (a file directly under the workspace root).
Tags: affects_outputs , changes_inputs , loading_and_analysis
--platforms =<a build target label> default: ""
The labels of the platform rules describing the target platforms for the current command.
Tags: affects_outputs , changes_inputs , loading_and_analysis
--python2_path =<a string> default: see description
Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.
Tags: no_op , deprecated
--python3_path =<a string> default: see description
Deprecated, no-op. Disabled by `--incompatible_use_python_toolchains`.
Tags: no_op , deprecated
--python_path =<a string> default: see description
The absolute path of the Python interpreter invoked to run Python targets on the target platform. Deprecated; disabled by --incompatible_use_python_toolchains.
Tags: loading_and_analysis , affects_outputs
--python_top =<a build target label> default: see description
The label of a py_runtime representing the Python interpreter invoked to run Python targets on the target platform. Deprecated; disabled by --incompatible_use_python_toolchains.
Tags: loading_and_analysis , affects_outputs
--target_platform_fallback =<a build target label> default: "@local_config_platform//:host"
The label of a platform rule that should be used if no target platform is set and no platform mapping matches the current set of flags.
Tags: affects_outputs , changes_inputs , loading_and_analysis
--tvos_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the tvOS SDK to use to build tvOS applications. If unspecified, uses default tvOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--watchos_sdk_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Specifies the version of the watchOS SDK to use to build watchOS applications. If unspecified, uses default watchOS SDK version from 'xcode_version'.
Tags: loses_incremental_state
--xcode_version =<a string> default: see description
If specified, uses Xcode of the given version for relevant build actions. If unspecified, uses the executor default version of Xcode.
Tags: loses_incremental_state
--xcode_version_config =<a build target label> default: "@bazel_tools//tools/cpp:host_xcodes"
The label of the xcode_config rule to be used for selecting the Xcode version in the build configuration.
Tags: loses_incremental_state , loading_and_analysis
Options that control the output of the command:
--[no]apple_enable_auto_dsym_dbg default: "false"
Whether to force enable generating debug symbol(.dSYM) file(s) for dbg builds.
Tags: affects_outputs , action_command_lines
--[no]apple_generate_dsym default: "false"
Whether to generate debug symbol(.dSYM) file(s).
Tags: affects_outputs , action_command_lines
If true, build runfiles symlink forests for all targets. If false, write only manifests when possible.
Tags: affects_outputs
--[no]build_runfile_manifests default: "true"
If true, write runfiles manifests for all targets. If false, omit them. Local tests will fail to run when false.
Tags: affects_outputs
--[no]build_test_dwp default: "false"
If enabled, when building C++ tests statically and with fission the .dwp file for the test binary will be automatically built as well.
Tags: loading_and_analysis , affects_outputs
--cc_proto_library_header_suffixes =<comma-separated list of options> default: ".pb.h"
Sets the prefixes of header files that a cc_proto_library creates.
Tags: affects_outputs , loading_and_analysis
--cc_proto_library_source_suffixes =<comma-separated list of options> default: ".pb.cc"
Sets the prefixes of source files that a cc_proto_library creates.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_proto_descriptor_sets_include_source_info default: "false"
Run extra actions for alternative Java api versions in a proto_library.
Tags: affects_outputs , loading_and_analysis , experimental
--[no]experimental_proto_extra_actions default: "false"
Run extra actions for alternative Java api versions in a proto_library.
Tags: affects_outputs , loading_and_analysis , experimental
--[no]experimental_save_feature_state default: "false"
Save the state of enabled and requested feautres as an output of compilation.
Tags: affects_outputs , experimental
--fission =<a set of compilation modes> default: "no"
Specifies which compilation modes use fission for C++ compilations and links. May be any combination of {'fastbuild', 'dbg', 'opt'} or the special values 'yes' to enable all modes and 'no' to disable all modes.
Tags: loading_and_analysis , action_command_lines , affects_outputs
--[no]legacy_external_runfiles default: "true"
If true, build runfiles symlink forests for external repositories under .runfiles/wsname/external/repo (in addition to .runfiles/repo).
Tags: affects_outputs
--[no]objc_generate_linkmap default: "false"
Specifies whether to generate a linkmap file.
Tags: affects_outputs
--[no]save_temps default: "false"
If set, temporary outputs from gcc will be saved. These include .s files (assembler code), .i files (preprocessed C) and .ii files (preprocessed C++).
Tags: affects_outputs
Options that let the user configure the intended output, affecting its value, as opposed to its existence:
--action_env =<a 'name=value' assignment with an optional value part> multiple uses are accumulated
Specifies the set of environment variables available to actions with target configuration. Variables can be either specified by name, in which case the value will be taken from the invocation environment, or by the name=value pair which sets the value independent of the invocation environment. This option can be used multiple times; for options given for the same variable, the latest wins, options for different variables accumulate.
Tags: action_command_lines
--android_cpu =<a string> default: "armeabi-v7a"
The Android target CPU.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]android_databinding_use_androidx default: "false"
Generate AndroidX-compatible data-binding files. This is only used with databinding v2.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--[no]android_databinding_use_v3_4_args default: "false"
Use android databinding v2 with 3.4.0 argument
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--android_dynamic_mode =<off, default or fully> default: "off"
Determines whether C++ deps of Android rules will be linked dynamically when a cc_binary does not explicitly create a shared library. 'default' means bazel will choose whether to link dynamically. 'fully' means all libraries will be linked dynamically. 'off' means that all libraries will be linked in mostly static mode.
Tags: affects_outputs , loading_and_analysis
--android_manifest_merger_order =<alphabetical, alphabetical_by_configuration or dependency> default: "alphabetical"
Sets the order of manifests passed to the manifest merger for Android binaries. ALPHABETICAL means manifests are sorted by path relative to the execroot. ALPHABETICAL_BY_CONFIGURATION means manifests are sorted by paths relative to the configuration directory within the output directory. DEPENDENCY means manifests are ordered with each library's manifest coming before the manifests of its dependencies.
Tags: action_command_lines , execution
--[no]android_resource_shrinking default: "false"
Enables resource shrinking for android_binary APKs that use ProGuard.
Tags: affects_outputs , loading_and_analysis
--apple_bitcode =<'mode' or 'platform=mode', where 'mode' is none, embedded_markers or embedded, and 'platform' is ios, watchos, tvos, macos or catalyst> multiple uses are accumulated
Specify the Apple bitcode mode for compile steps targeting device architectures. Values are of the form '[platform=]mode', where the platform (which must be 'ios', 'macos', 'tvos', or 'watchos') is optional. If provided, the bitcode mode is applied for that platform specifically; if omitted, it is applied for all platforms. The mode must be 'none', 'embedded_markers', or 'embedded'. This option may be provided multiple times.
Tags: loses_incremental_state
--[no]build_python_zip default: "auto"
Build python executable zip; on on Windows, off on other platforms
Tags: affects_outputs
--catalyst_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple Catalyst binaries.
Tags: loses_incremental_state , loading_and_analysis
--[no]collect_code_coverage default: "false"
If specified, Bazel will instrument code (using offline instrumentation where possible) and will collect coverage information during tests. Only targets that match --instrumentation_filter will be affected. Usually this option should not be specified directly - 'bazel coverage' command should be used instead.
Tags: affects_outputs
--compilation_mode =<fastbuild, dbg or opt> [ -c ] default: "fastbuild"
Specify the mode the binary will be built in. Values: 'fastbuild', 'dbg', 'opt'.
Tags: affects_outputs , action_command_lines , explicit_in_output_path
--conlyopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when compiling C source files.
Tags: action_command_lines , affects_outputs
--copt =<a string> multiple uses are accumulated
Additional options to pass to gcc.
Tags: action_command_lines , affects_outputs
--cpu =<a string> default: ""
The target CPU.
Tags: changes_inputs , affects_outputs , explicit_in_output_path
--cs_fdo_absolute_path =<a string> default: see description
Use CSFDO profile information to optimize compilation. Specify the absolute path name of the zip file containing the profile file, a raw or an indexed LLVM profile file.
Tags: affects_outputs
--cs_fdo_instrument =<a string> default: see description
Generate binaries with context sensitive FDO instrumentation. With Clang/LLVM compiler, it also accepts the directory name under which the raw profile file(s) will be dumped at runtime.
Tags: affects_outputs
--cs_fdo_profile =<a build target label> default: see description
The cs_fdo_profile representing the context sensitive profile to be used for optimization.
Tags: affects_outputs
--cxxopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when compiling C++ source files.
Tags: action_command_lines , affects_outputs
--define =<a 'name=value' assignment> multiple uses are accumulated
Each --define option specifies an assignment for a build variable.
Tags: changes_inputs , affects_outputs
--dynamic_mode =<off, default or fully> default: "default"
Determines whether C++ binaries will be linked dynamically. 'default' means Bazel will choose whether to link dynamically. 'fully' means all libraries will be linked dynamically. 'off' means that all libraries will be linked in mostly static mode.
Tags: loading_and_analysis , affects_outputs
--[no]enable_fdo_profile_absolute_path default: "true"
If set, use of fdo_absolute_profile_path will raise an error.
Tags: affects_outputs
--[no]enable_runfiles default: "auto"
Enable runfiles symlink tree; By default, it's off on Windows, on on other platforms.
Tags: affects_outputs
--experimental_action_listener =<a build target label> multiple uses are accumulated
Deprecated in favor of aspects. Use action_listener to attach an extra_action to existing build actions.
Tags: execution , experimental
--[no]experimental_android_compress_java_resources default: "false"
Compress Java resources in APKs
Tags: affects_outputs , loading_and_analysis , experimental
--[no]experimental_android_databinding_v2 default: "false"
Use android databinding v2
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--[no]experimental_android_resource_shrinking default: "false"
Enables resource shrinking for android_binary APKs that use ProGuard.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_android_rewrite_dexes_with_rex default: "false"
use rex tool to rewrite dex files
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--experimental_objc_fastbuild_options =<comma-separated list of options> default: "-O0,-DDEBUG=1"
Uses these strings as objc fastbuild compiler options.
Tags: action_command_lines
--[no]experimental_omitfp default: "false"
If true, use libunwind for stack unwinding, and compile with -fomit-frame-pointer and -fasynchronous-unwind-tables.
Tags: action_command_lines , affects_outputs , experimental
--[no]experimental_platform_in_output_dir default: "false"
If true, the target platform is used in the output directory name instead of the CPU.
Tags: affects_outputs , experimental
--[no]experimental_use_llvm_covmap default: "false"
If specified, Bazel will generate llvm-cov coverage map information rather than gcov when collect_code_coverage is enabled.
Tags: changes_inputs , affects_outputs , loading_and_analysis , experimental
--fat_apk_cpu =<comma-separated list of options> default: "armeabi-v7a"
Setting this option enables fat APKs, which contain native binaries for all specified target architectures, eg, --fat_apk_cpu=x86,armeabi-v7a. If this flag is specified, then --android_cpu is ignored for dependencies of android_binary rules.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]fat_apk_hwasan default: "false"
Whether to create HWASAN splits.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--fdo_instrument =<a string> default: see description
Generate binaries with FDO instrumentation. With Clang/LLVM compiler, it also accepts the directory name under which the raw profile file(s) will be dumped at runtime.
Tags: affects_outputs
--fdo_optimize =<a string> default: see description
Use FDO profile information to optimize compilation. Specify the name of a zip file containing a .gcda file tree, an afdo file containing an auto profile, or an LLVM profile file. This flag also accepts files specified as labels (eg `//foo/bar:file.afdo` - you may need to add an `exports_files` directive to the corresponding package) and labels pointing to `fdo_profile` targets. This flag will be superseded by the `fdo_profile` rule.
Tags: affects_outputs
--fdo_prefetch_hints =<a build target label> default: see description
Use cache prefetch hints.
Tags: affects_outputs
--fdo_profile =<a build target label> default: see description
The fdo_profile representing the profile to be used for optimization.
Tags: affects_outputs
--features =<a string> multiple uses are accumulated
The given features will be enabled or disabled by default for all packages. Specifying -<feature> will disable the feature globally. Negative features always override positive ones. This flag is used to enable rolling out default feature changes without a Bazel release.
Tags: changes_inputs , affects_outputs
--[no]force_pic default: "false"
If enabled, all C++ compilations produce position-independent code ("-fPIC"), links prefer PIC pre-built libraries over non-PIC libraries, and links produce position-independent executables ("-pie").
Tags: loading_and_analysis , affects_outputs
--host_action_env =<a 'name=value' assignment with an optional value part> multiple uses are accumulated
Specifies the set of environment variables available to actions with host or execution configurations. Variables can be either specified by name, in which case the value will be taken from the invocation environment, or by the name=value pair which sets the value independent of the invocation environment. This option can be used multiple times; for options given for the same variable, the latest wins, options for different variables accumulate.
Tags: action_command_lines
--host_compilation_mode =<fastbuild, dbg or opt> default: "opt"
Specify the mode the tools used during the build will be built in. Values: 'fastbuild', 'dbg', 'opt'.
Tags: affects_outputs , action_command_lines
--host_conlyopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when compiling C source files for host tools.
Tags: action_command_lines , affects_outputs
--host_copt =<a string> multiple uses are accumulated
Additional options to pass to gcc for host tools.
Tags: action_command_lines , affects_outputs
--host_cpu =<a string> default: ""
The host CPU.
Tags: changes_inputs , affects_outputs
--host_cxxopt =<a string> multiple uses are accumulated
Additional options to pass to gcc for host tools.
Tags: action_command_lines , affects_outputs
--host_force_python =<PY2 or PY3> default: see description
Overrides the Python version for the host configuration. Can be "PY2" or "PY3".
Tags: loading_and_analysis , affects_outputs
--host_linkopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when linking host tools.
Tags: action_command_lines , affects_outputs
--host_macos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible macOS version for host targets. If unspecified, uses 'macos_sdk_version'.
Tags: loses_incremental_state
--host_swiftcopt =<a string> multiple uses are accumulated
Additional options to pass to swiftc for host tools.
Tags: action_command_lines , affects_outputs
--[no]incompatible_avoid_conflict_dlls default: "true"
If enabled, all C++ dynamic linked libraries (DLLs) generated by cc_library on Windows will be renamed to name_{hash}.dll where hash is calculated based on the RepositoryName and the DLL's package path. This option is useful when you have one package which depends on severals cc_library with the same name (eg //foo/bar1:utils and //foo/bar2:utils).
Tags: loading_and_analysis , affects_outputs , incompatible_change
--[no]incompatible_merge_genfiles_directory default: "true"
If true, the genfiles directory is folded into the bin directory.
Tags: affects_outputs , incompatible_change
--[no]incompatible_use_platforms_repo_for_constraints default: "false"
If true, constraint settings from @bazel_tools are removed.
Tags: affects_outputs , incompatible_change
--[no]instrument_test_targets default: "false"
When coverage is enabled, specifies whether to consider instrumenting test rules. When set, test rules included by --instrumentation_filter are instrumented. Otherwise, test rules are always excluded from coverage instrumentation.
Tags: affects_outputs
--instrumentation_filter =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths> default: "-/javatests[/:],-/test/java[/:]"
When coverage is enabled, only rules with names included by the specified regex-based filter will be instrumented. Rules prefixed with '-' are excluded instead. Note that only non-test rules are instrumented unless --instrument_test_targets is enabled.
Tags: affects_outputs
--ios_cpu =<a string> default: "x86_64"
Specifies to target CPU of iOS compilation.
Tags: no_op , deprecated
--ios_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible iOS version for target simulators and devices. If unspecified, uses 'ios_sdk_version'.
Tags: loses_incremental_state
--ios_multi_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures to build an ios_application with. The result is a universal binary containing all specified architectures.
Tags: loses_incremental_state , loading_and_analysis
--[no]legacy_whole_archive default: "true"
Deprecated, superseded by --incompatible_remove_legacy_whole_archive (see https://github.com/bazelbuild/bazel/issues/7362 for details). When on, use --whole-archive for cc_binary rules that have linkshared=1 and either linkstatic=1 or '-static' in linkopts. This is for backwards compatibility only. A better alternative is to use alwayslink=1 where required.
Tags: action_command_lines , affects_outputs , deprecated
--linkopt =<a string> multiple uses are accumulated
Additional option to pass to gcc when linking.
Tags: action_command_lines , affects_outputs
--ltobackendopt =<a string> multiple uses are accumulated
Additional option to pass to the LTO backend step (under --features=thin_lto).
Tags: action_command_lines , affects_outputs
--ltoindexopt =<a string> multiple uses are accumulated
Additional option to pass to the LTO indexing step (under --features=thin_lto).
Tags: action_command_lines , affects_outputs
--macos_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple macOS binaries.
Tags: loses_incremental_state , loading_and_analysis
--macos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible macOS version for targets. If unspecified, uses 'macos_sdk_version'.
Tags: loses_incremental_state
--[no]objc_debug_with_GLIBCXX default: "false"
If set, and compilation mode is set to 'dbg', define GLIBCXX_DEBUG, GLIBCXX_DEBUG_PEDANTIC and GLIBCPP_CONCEPT_CHECKS.
Tags: action_command_lines
--[no]objc_enable_binary_stripping default: "false"
Whether to perform symbol and dead-code strippings on linked binaries. Binary strippings will be performed if both this flag and --compilation_mode=opt are specified.
Tags: action_command_lines
--objccopt =<a string> multiple uses are accumulated
Additional options to pass to gcc when compiling Objective-C/C++ source files.
Tags: action_command_lines
--per_file_copt =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths followed by an @ and a comma separated list of options> multiple uses are accumulated
Additional options to selectively pass to gcc when compiling certain files. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --per_file_copt=//foo/.*\.cc,-//foo/bar\.cc@-O0 adds the -O0 command line option to the gcc command line of all cc files in //foo/ except bar.cc.
Tags: action_command_lines , affects_outputs
--per_file_ltobackendopt =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths followed by an @ and a comma separated list of options> multiple uses are accumulated
Additional options to selectively pass to LTO backend (under --features=thin_lto) when compiling certain backend objects. This option can be passed multiple times. Syntax: regex_filter@option_1,option_2,...,option_n. Where regex_filter stands for a list of include and exclude regular expression patterns. option_1 to option_n stand for arbitrary command line options. If an option contains a comma it has to be quoted with a backslash. Options can contain @. Only the first @ is used to split the string. Example: --per_file_ltobackendopt=//foo/.*\.o,-//foo/bar\.o@-O0 adds the -O0 command line option to the LTO backend command line of all o files in //foo/ except bar.o.
Tags: action_command_lines , affects_outputs
--platform_suffix =<a string> default: see description
Specifies a suffix to be added to the configuration directory.
Tags: loses_incremental_state , affects_outputs , loading_and_analysis
--propeller_optimize =<a build target label> default: see description
Use Propeller profile information to optimize the build target.A propeller profile must consist of at least one of two files, a cc profile and a ld profile. This flag accepts a build label which must refer to the propeller profile input files. For example, the BUILD file that defines the label, in a/b/BUILD:propeller_optimize( name = "propeller_profile", cc_profile = "propeller_cc_profile.txt", ld_profile = "propeller_ld_profile.txt",)An exports_files directive may have to be added to the corresponding package to make these files visible to Bazel. The option must be used as: --propeller_optimize=//a/b:propeller_profile
Tags: action_command_lines , affects_outputs
--propeller_optimize_absolute_cc_profile =<a string> default: see description
Absolute path name of cc_profile file for Propeller Optimized builds.
Tags: affects_outputs
--propeller_optimize_absolute_ld_profile =<a string> default: see description
Absolute path name of ld_profile file for Propeller Optimized builds.
Tags: affects_outputs
--run_under =<a prefix in front of command> default: see description
Prefix to insert before the executables for the 'test' and 'run' commands. If the value is 'foo -bar', and the execution command line is 'test_binary -baz', then the final command line is 'foo -bar test_binary -baz'.This can also be a label to an executable target. Some examples are: 'valgrind', 'strace', 'strace -c', 'valgrind --quiet --num-callers=20', '//package:target', '//package:target --options'.
Tags: action_command_lines
--[no]share_native_deps default: "true"
If true, native libraries that contain identical functionality will be shared among different targets
Tags: loading_and_analysis , affects_outputs
--[no]stamp default: "false"
Stamp binaries with the date, username, hostname, workspace information, etc.
Tags: affects_outputs
--strip =<always, sometimes or never> default: "sometimes"
Specifies whether to strip binaries and shared libraries (using "-Wl,--strip-debug"). The default value of 'sometimes' means strip iff --compilation_mode=fastbuild.
Tags: affects_outputs
--stripopt =<a string> multiple uses are accumulated
Additional options to pass to strip when generating a '<name>.stripped' binary.
Tags: action_command_lines , affects_outputs
--swiftcopt =<a string> multiple uses are accumulated
Additional options to pass to Swift compilation.
Tags: action_command_lines
--tvos_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple tvOS binaries.
Tags: loses_incremental_state , loading_and_analysis
--tvos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible tvOS version for target simulators and devices. If unspecified, uses 'tvos_sdk_version'.
Tags: loses_incremental_state
--watchos_cpus =<comma-separated list of options> multiple uses are accumulated
Comma-separated list of architectures for which to build Apple watchOS binaries.
Tags: loses_incremental_state , loading_and_analysis
--watchos_minimum_os =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
Minimum compatible watchOS version for target simulators and devices. If unspecified, uses 'watchos_sdk_version'.
Tags: loses_incremental_state
--xbinary_fdo =<a build target label> default: see description
Use XbinaryFDO profile information to optimize compilation. Specify the name of default cross binary profile. When the option is used together with --fdo_instrument/--fdo_optimize/--fdo_profile, those options will always prevail as if xbinary_fdo is never specified.
Tags: affects_outputs
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--auto_cpu_environment_group =<a build target label> default: ""
Declare the environment_group to use for automatically mapping cpu values to target_environment values.
Tags: changes_inputs , loading_and_analysis , experimental
--[no]check_licenses default: "false"
Check that licensing constraints imposed by dependent packages do not conflict with distribution modes of the targets being built. By default, licenses are not checked.
Tags: build_file_semantics
--[no]check_visibility default: "true"
If disabled, visibility errors are demoted to warnings.
Tags: build_file_semantics
--[no]desugar_for_android default: "true"
Whether to desugar Java 8 bytecode before dexing.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]enforce_constraints default: "true"
Checks the environments each target is compatible with and reports errors if any target has dependencies that don't support the same environments
Tags: build_file_semantics
--[no]experimental_allow_android_library_deps_without_srcs default: "false"
Flag to help transition from allowing to disallowing srcs-less android_library rules with deps. The depot needs to be cleaned up to roll this out by default.
Tags: eagerness_to_exit , loading_and_analysis
--[no]experimental_check_desugar_deps default: "true"
Whether to double-check correct desugaring at Android binary level.
Tags: eagerness_to_exit , loading_and_analysis , experimental
--[no]experimental_desugar_java8_libs default: "false"
Whether to include supported Java 8 libraries in apps for legacy devices.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state , experimental
--experimental_import_deps_checking =<off, warning or error> default: "OFF"
When enabled, check whether the dependencies of an aar_import are complete. This enforcement can break the build, or can just result in warnings.
Tags: loading_and_analysis
--experimental_strict_java_deps =<off, warn, error, strict or default> default: "default"
If true, checks that a Java target explicitly declares all directly used targets as dependencies.
Tags: build_file_semantics , eagerness_to_exit
--[no]incompatible_disable_native_android_rules default: "false"
If enabled, direct usage of the native Android rules is disabled. Please use the Starlark Android rules from https://github.com/bazelbuild/rules_android
Tags: eagerness_to_exit , incompatible_change
--[no]incompatible_disable_native_apple_binary_rule default: "false"
No-op. Kept here for backwards compatibility.
Tags: eagerness_to_exit , incompatible_change
--[no]incompatible_force_strict_header_check_from_starlark default: "true"
If enabled, set strict header checking in the Starlark API
Tags: loading_and_analysis , changes_inputs , incompatible_change
--[no]incompatible_validate_top_level_header_inclusions default: "true"
If true, Bazel will also validate top level directory header inclusions (see https://github.com/bazelbuild/bazel/issues/10047 for more information).
Tags: loading_and_analysis , incompatible_change
--[no]strict_filesets default: "false"
If this option is enabled, filesets crossing package boundaries are reported as errors. It does not work when check_fileset_dependencies_recursively is disabled.
Tags: build_file_semantics , eagerness_to_exit
--strict_proto_deps =<off, warn, error, strict or default> default: "error"
Unless OFF, checks that a proto_library target explicitly declares all directly used targets as dependencies.
Tags: build_file_semantics , eagerness_to_exit , incompatible_change
--strict_public_imports =<off, warn, error, strict or default> default: "off"
Unless OFF, checks that a proto_library target explicitly declares all targets used in 'import public' as exported.
Tags: build_file_semantics , eagerness_to_exit , incompatible_change
--[no]strict_system_includes default: "false"
If true, headers found through system include paths (-isystem) are also required to be declared.
Tags: loading_and_analysis , eagerness_to_exit
--target_environment =<a build target label> multiple uses are accumulated
Declares this build's target environment. Must be a label reference to an "environment" rule. If specified, all top-level targets must be compatible with this environment.
Tags: changes_inputs
Options that affect the signing outputs of a build:
--apk_signing_method =<v1, v2, v1_v2 or v4> default: "v1_v2"
Implementation to use to sign APKs
Tags: action_command_lines , affects_outputs , loading_and_analysis
--[no]device_debug_entitlements default: "true"
If set, and compilation mode is not 'opt', objc apps will include debug entitlements when signing.
Tags: changes_inputs
--ios_signing_cert_name =<a string> default: see description
Certificate name to use for iOS signing. If not set will fall back to provisioning profile. May be the certificate's keychain identity preference or (substring) of the certificate's common name, as per codesign's man page (SIGNING IDENTITIES).
Tags: action_command_lines
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]incompatible_disallow_legacy_py_provider default: "true"
No-op, will be removed soon.
Tags: loading_and_analysis , incompatible_change
Options that govern the behavior of the test environment or test runner:
--[no]allow_analysis_failures default: "false"
If true, an analysis failure of a rule target results in the target's propagation of an instance of AnalysisFailureInfo containing the error description, instead of resulting in a build failure.
Tags: loading_and_analysis , experimental
--analysis_testing_deps_limit =<an integer> default: "2000"
Sets the maximum number of transitive dependencies through a rule attribute with a for_analysis_testing configuration transition. Exceeding this limit will result in a rule error.
Tags: loading_and_analysis
--[no]break_build_on_parallel_dex2oat_failure default: "false"
If true dex2oat action failures will cause the build to break instead of executing dex2oat during test runtime.
Tags: loading_and_analysis , experimental
--[no]experimental_android_use_parallel_dex2oat default: "false"
Use dex2oat in parallel to possibly speed up android_test.
Tags: loading_and_analysis , host_machine_resource_optimizations , experimental
--[no]ios_memleaks default: "false"
Enable checking for memory leaks in ios_test targets.
Tags: action_command_lines
--ios_simulator_device =<a string> default: see description
The device to simulate when running an iOS application in the simulator, eg 'iPhone 6'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.
Tags: test_runner
--ios_simulator_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
The version of iOS to run on the simulator when running or testing. This is ignored for ios_test rules if a target device is specified in the rule.
Tags: test_runner
--runs_per_test =<a positive integer or test_regex@runs. This flag may be passed more than once> multiple uses are accumulated
Specifies number of times to run each test. If any of those attempts fail for any reason, the whole test is considered failed. Normally the value specified is just an integer. Example: --runs_per_test=3 will run all tests 3 times. Alternate syntax: regex_filter@runs_per_test. Where runs_per_test stands for an integer value and regex_filter stands for a list of include and exclude regular expression patterns (Also see --instrumentation_filter). Example: --runs_per_test=//foo/.*,-//foo/bar/.*@3 runs all tests in //foo/ except those under foo/bar three times. This option can be passed multiple times. The most recently passed argument that matches takes precedence. If nothing matches, the test is only run once.
--test_env =<a 'name=value' assignment with an optional value part> multiple uses are accumulated
Specifies additional environment variables to be injected into the test runner environment. Variables can be either specified by name, in which case its value will be read from the Bazel client environment, or by the name=value pair. This option can be used multiple times to specify several variables. Used only by the 'bazel test' command.
Tags: test_runner
--test_timeout =<a single integer or comma-separated list of 4 integers> default: "-1"
Override the default test timeout values for test timeouts (in secs). If a single positive integer value is specified it will override all categories. If 4 comma-separated integers are specified, they will override the timeouts for short, moderate, long and eternal (in that order). In either form, a value of -1 tells blaze to use its default timeouts for that category.
--tvos_simulator_device =<a string> default: see description
The device to simulate when running an tvOS application in the simulator, eg 'Apple TV 1080p'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.
Tags: test_runner
--tvos_simulator_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
The version of tvOS to run on the simulator when running or testing.
Tags: test_runner
--watchos_simulator_device =<a string> default: see description
The device to simulate when running an watchOS application in the simulator, eg 'Apple Watch - 38mm'. You can get a list of devices by running 'xcrun simctl list devicetypes' on the machine the simulator will be run on.
Tags: test_runner
--watchos_simulator_version =<a dotted version (for example '2.3' or '3.3alpha2.4')> default: see description
The version of watchOS to run on the simulator when running or testing.
Tags: test_runner
--[no]zip_undeclared_test_outputs default: "true"
If true, undeclared test outputs will be archived in a zip file.
Tags: test_runner
Options relating to query output and semantics:
--aspect_deps =<off, conservative or precise> default: "conservative"
How to resolve aspect dependencies when the output format is one of {xml,proto,record}. 'off' means no aspect dependencies are resolved, 'conservative' (the default) means all declared aspect dependencies are added regardless of whether they are given the rule class of direct dependencies, 'precise' means that only those aspects are added that are possibly active given the rule class of the direct dependencies. Note that precise mode requires loading other packages to evaluate a single target thus making it slower than the other modes. Also note that even precise mode is not completely precise: the decision whether to compute an aspect is decided in the analysis phase, which is not run during 'bazel query'.
Tags: build_file_semantics
--[no]graph:factored default: "true"
If true, then the graph will be emitted 'factored', ie topologically-equivalent nodes will be merged together and their labels concatenated. This option is only applicable to --output=graph.
Tags: terminal_output
--graph:node_limit =<an integer> default: "512"
The maximum length of the label string for a graph node in the output. Longer labels will be truncated; -1 means no truncation. This option is only applicable to --output=graph.
Tags: terminal_output
--[no]implicit_deps default: "true"
If enabled, implicit dependencies will be included in the dependency graph over which the query operates. An implicit dependency is one that is not explicitly specified in the BUILD file but added by bazel. For cquery, this option controls filtering resolved toolchains.
Tags: build_file_semantics
--[no]include_aspects default: "true"
aquery, cquery: whether to include aspect-generated actions in the output. query: no-op (aspects are always followed).
Tags: terminal_output
--[no]incompatible_display_source_file_location default: "true"
True by default, displays the target of the source file. If true, displays the location of line 1 of source files in location outputs. This flag only exists for migration purposes.
Tags: terminal_output , incompatible_change
--[no]infer_universe_scope default: "false"
If set and --universe_scope is unset, then a value of --universe_scope will be inferred as the list of unique target patterns in the query expression. Note that the --universe_scope value inferred for a query expression that uses universe-scoped functions (eg`allrdeps`) may not be what you want, so you should use this option only if you know what you are doing. See https://bazel.build/reference/query#sky-query for details and examples. If --universe_scope is set, then this option's value is ignored. Note: this option applies only to `query` (ie not `cquery`).
Tags: loading_and_analysis
--[no]line_terminator_null default: "false"
Whether each format is terminated with \0 instead of newline.
Tags: terminal_output
--[no]nodep_deps default: "true"
If enabled, deps from "nodep" attributes will be included in the dependency graph over which the query operates. A common example of a "nodep" attribute is "visibility". Run and parse the output of `info build-language` to learn about all the "nodep" attributes in the build language.
Tags: build_file_semantics
--output =<a string> default: "label"
The format in which the cquery results should be printed. Allowed values for cquery are: label, label_kind, textproto, transitions, proto, jsonproto. If you select 'transitions', you also have to specify the --transitions=(lite|full) option.
Tags: terminal_output
--[no]proto:default_values default: "true"
If true, attributes whose value is not explicitly specified in the BUILD file are included; otherwise they are omitted. This option is applicable to --output=proto
Tags: terminal_output
--[no]proto:definition_stack default: "false"
Populate the definition_stack proto field, which records for each rule instance the Starlark call stack at the moment the rule's class was defined.
Tags: terminal_output
--[no]proto:flatten_selects default: "true"
If enabled, configurable attributes created by select() are flattened. For list types the flattened representation is a list containing each value of the select map exactly once. Scalar types are flattened to null.
Tags: build_file_semantics
--[no]proto:include_configurations default: "true"
if enabled, proto output will include information about configurations. When disabled,cquery proto output format resembles query output format.
Tags: affects_outputs
--[no]proto:include_synthetic_attribute_hash default: "false"
Whether or not to calculate and populate the $internal_attr_hash attribute.
Tags: terminal_output
--[no]proto:instantiation_stack default: "false"
Populate the instantiation call stack of each rule. Note that this requires the stack to be present
Tags: terminal_output
--[no]proto:locations default: "true"
Whether to output location information in proto output at all.
Tags: terminal_output
--proto:output_rule_attrs =<comma-separated list of options> default: "all"
Comma separated list of attributes to include in output. Defaults to all attributes. Set to empty string to not output any attribute. This option is applicable to --output=proto.
Tags: terminal_output
--[no]proto:rule_inputs_and_outputs default: "true"
Whether or not to populate the rule_input and rule_output fields.
Tags: terminal_output
--[no]relative_locations default: "false"
If true, the location of BUILD files in xml and proto outputs will be relative. By default, the location output is an absolute path and will not be consistent across machines. You can set this option to true to have a consistent result across machines.
Tags: terminal_output
--show_config_fragments =<off, direct or transitive> default: "off"
Shows the configuration fragments required by a rule and its transitive dependencies. This can be useful for evaluating how much a configured target graph can be trimmed.
Tags: affects_outputs
--starlark:expr =<a string> default: ""
A Starlark expression to format each configured target in cquery's --output=starlark mode. The configured target is bound to 'target'. If neither --starlark:expr nor --starlark:file is specified, this option will default to 'str(target.label)'. It is an error to specify both --starlark:expr and --starlark:file.
Tags: terminal_output
--starlark:file =<a string> default: ""
The name of a file that defines a Starlark function called 'format', of one argument, that is applied to each configured target to format it as a string. It is an error to specify both --starlark:expr and --starlark:file. See help for --output=starlark for additional detail.
Tags: terminal_output
--[no]tool_deps default: "true"
Query: If disabled, dependencies on 'host configuration' or 'execution' targets will not be included in the dependency graph over which the query operates. A 'host configuration' dependency edge, such as the one from any 'proto_library' rule to the Protocol Compiler, usually points to a tool executed during the build rather than a part of the same 'target' program. Cquery: If disabled, filters out all configured targets which cross a host or execution transition from the top-level target that discovered this configured target. That means if the top-level target is in the target configuration, only configured targets also in the target configuration will be returned. If the top-level target is in the host configuration, only host configured targets will be returned. This option will NOT exclude resolved toolchains.
Tags: build_file_semantics
--transitions =<full, lite or none> default: "none"
The format in which cquery will print transition information.
Tags: affects_outputs
--universe_scope =<comma-separated list of options> default: ""
A comma-separated set of target patterns (additive and subtractive). The query may be performed in the universe defined by the transitive closure of the specified targets. This option is used for the query and cquery commands. For cquery, the input to this option is the targets all answers are built under and so this option may affect configurations and transitions. If this option is not specified, the top-level targets are assumed to be the targets parsed from the query expression. Note: For cquery, not specifying this option may cause the build to break if targets parsed from the query expression are not buildable with top-level options.
Tags: loading_and_analysis
Options that trigger optimizations of the build time:
--[no]collapse_duplicate_defines default: "false"
When enabled, redundant --defines will be removed early in the build. This avoids unnecessary loss of the analysis cache for certain types of equivalent builds.
Tags: loading_and_analysis , loses_incremental_state
--[no]experimental_filter_library_jar_with_program_jar default: "false"
Filter the ProGuard ProgramJar to remove any classes also present in the LibraryJar.
Tags: action_command_lines
--[no]experimental_inmemory_dotd_files default: "false"
If enabled, C++ .d files will be passed through in memory directly from the remote build nodes instead of being written to disk.
Tags: loading_and_analysis , execution , affects_outputs , experimental
--[no]experimental_inmemory_jdeps_files default: "false"
If enabled, the dependency (.jdeps) files generated from Java compilations will be passed through in memory directly from the remote build nodes instead of being written to disk.
Tags: loading_and_analysis , execution , affects_outputs , experimental
--[no]experimental_objc_include_scanning default: "false"
Whether to perform include scanning for objective C/C++.
Tags: loading_and_analysis , execution , changes_inputs
--[no]experimental_parse_headers_skipped_if_corresponding_srcs_found default: "false"
If enabled, the parse_headers feature does not create a separate header compile action if a source with the same basename is found in the same target.
Tags: loading_and_analysis , affects_outputs
--[no]experimental_retain_test_configuration_across_testonly default: "false"
When enabled, --trim_test_configuration will not trim the test configuration for rules marked testonly=1. This is meant to reduce action conflict issues when non-test rules depend on cc_test rules. No effect if --trim_test_configuration is false.
Tags: loading_and_analysis , loses_incremental_state
--[no]experimental_starlark_cc_import default: "false"
If enabled, the Starlark version of cc_import can be used.
Tags: loading_and_analysis , experimental
--[no]experimental_unsupported_and_brittle_include_scanning default: "false"
Whether to narrow inputs to C/C++ compilation by parsing #include lines from input files. This can improve performance and incrementality by decreasing the size of compilation input trees. However, it can also break builds because the include scanner does not fully implement C preprocessor semantics. In particular, it does not understand dynamic #include directives and ignores preprocessor conditional logic. Use at your own risk. Any issues relating to this flag that are filed will be closed.
Tags: loading_and_analysis , execution , changes_inputs
--[no]incremental_dexing default: "true"
Does most of the work for dexing separately for each Jar file.
Tags: affects_outputs , loading_and_analysis , loses_incremental_state
--[no]objc_use_dotd_pruning default: "true"
If set, .d files emitted by clang will be used to prune the set of inputs passed into objc compiles.
Tags: changes_inputs , loading_and_analysis
--[no]process_headers_in_dependencies default: "false"
When building a target //a:a, process headers in all targets that //a:a depends on (if header processing is enabled for the toolchain).
Tags: execution
--[no]trim_test_configuration default: "true"
When enabled, test-related options will be cleared below the top level of the build. When this flag is active, tests cannot be built as dependencies of non-test rules, but changes to test-related options will not cause non-test rules to be re-analyzed.
Tags: loading_and_analysis , loses_incremental_state
--[no]use_singlejar_apkbuilder default: "true"
This option is a deprecated. It is now a no-op and will be removed soon.
Tags: loading_and_analysis
Options that affect the verbosity, format or location of logging:
--toolchain_resolution_debug =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths> default: "-.*"
Print debug information during toolchain resolution. The flag takes a regex, which is checked against toolchain types and specific targets to see which to debug. Multiple regexes may be separated by commas, and then each regex is checked separately. Note: The output of this flag is very complex and will likely only be useful to experts in toolchain resolution.
Tags: terminal_output
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--flag_alias =<a 'name=value' flag alias> multiple uses are accumulated
Sets a shorthand name for a Starlark flag. It takes a single key-value pair in the form "<key>=<value>" as an argument.
Tags: changes_inputs
--[no]incompatible_default_to_explicit_init_py default: "false"
This flag changes the default behavior so that __init__.py files are no longer automatically created in the runfiles of Python targets. Precisely, when a py_binary or py_test target has legacy_create_init set to "auto" (the default), it is treated as false if and only if this flag is set. See https://github.com/bazelbuild/bazel/issues/10076.
Tags: affects_outputs , incompatible_change
--[no]incompatible_py2_outputs_are_suffixed default: "true"
If true, targets built in the Python 2 configuration will appear under an output root that includes the suffix '-py2', while targets built for Python 3 will appear in a root with no Python-related suffix. This means that the `bazel-bin` convenience symlink will point to Python 3 targets rather than Python 2. If you enable this option it is also recommended to enable `--incompatible_py3_is_default`.
Tags: affects_outputs , incompatible_change
--[no]incompatible_py3_is_default default: "true"
If true, `py_binary` and `py_test` targets that do not set their `python_version` (or `default_python_version`) attribute will default to PY3 rather than to PY2. If you set this flag it is also recommended to set `--incompatible_py2_outputs_are_suffixed`.
Tags: loading_and_analysis , affects_outputs , incompatible_change
--[no]incompatible_use_python_toolchains default: "true"
If set to true, executable native Python rules will use the Python runtime specified by the Python toolchain, rather than the runtime given by legacy flags like --python_top.
Tags: loading_and_analysis , incompatible_change
--python_version =<PY2 or PY3> default: see description
The Python major version mode, either `PY2` or `PY3`. Note that this is overridden by `py_binary` and `py_test` targets (even if they don't explicitly specify a version) so there is usually not much reason to supply this flag.
Tags: loading_and_analysis , affects_outputs , explicit_in_output_path
Miscellaneous options, not otherwise categorized.:
--[no]cache_test_results [ -t ] default: "auto"
If set to 'auto', Bazel reruns a test if and only if: (1) Bazel detects changes in the test or its dependencies, (2) the test is marked as external, (3) multiple test runs were requested with --runs_per_test, or(4) the test previously failed. If set to 'yes', Bazel caches all test results except for tests marked as external. If set to 'no', Bazel does not cache any test results.
--[no]experimental_cancel_concurrent_tests default: "false"
If true, then Blaze will cancel concurrently running tests on the first successful run. This is only useful in combination with --runs_per_test_detects_flakes.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_fetch_all_coverage_outputs default: "false"
If true, then Bazel fetches the entire coverage data directory for each test during a coverage run.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_generate_llvm_lcov default: "false"
If true, coverage for clang will generate an LCOV report.
Tags: affects_outputs , loading_and_analysis
--[no]experimental_j2objc_header_map default: "true"
Whether to generate J2ObjC header map in parallel of J2ObjC transpilation.
--[no]experimental_j2objc_shorter_header_path default: "false"
Whether to generate with shorter header path (uses "_ios" instead of "_j2objc").
Tags: affects_outputs
--experimental_java_classpath =<off, javabuilder or bazel> default: "javabuilder"
Enables reduced classpaths for Java compilations.
--[no]experimental_limit_android_lint_to_android_constrained_java default: "false"
Limit --experimental_run_android_lint_on_java_rules to Android-compatible libraries.
Tags: affects_outputs
--[no]experimental_run_android_lint_on_java_rules default: "false"
Whether to validate java_* sources.
Tags: affects_outputs
--[no]explicit_java_test_deps default: "false"
Explicitly specify a dependency to JUnit or Hamcrest in a java_test instead of accidentally obtaining from the TestRunner's deps. Only works for bazel right now.
--host_java_launcher =<a build target label> default: see description
The Java launcher used by tools that are executed during a build.
--host_javacopt =<a string> multiple uses are accumulated
Additional options to pass to javac when building tools that are executed during a build.
--host_jvmopt =<a string> multiple uses are accumulated
Additional options to pass to the Java VM when building tools that are executed during the build. These options will get added to the VM startup options of each java_binary target.
--[no]incompatible_exclusive_test_sandboxed default: "false"
If true, exclusive tests will run with sandboxed strategy. Add 'local' tag to force an exclusive test run locally
Tags: incompatible_change
--[no]incompatible_strict_action_env default: "false"
If true, Bazel uses an environment with a static value for PATH and does not inherit LD_LIBRARY_PATH. Use --action_env=ENV_VARIABLE if you want to inherit specific environment variables from the client, but note that doing so can prevent cross-user caching if a shared cache is used.
Tags: loading_and_analysis , incompatible_change
--j2objc_translation_flags =<comma-separated list of options> multiple uses are accumulated
Additional options to pass to the J2ObjC tool.
--java_debug
Causes the Java virtual machine of a java test to wait for a connection from a JDWP-compliant debugger (such as jdb) before starting the test. Implies -test_output=streamed.
Expands to:
--test_arg=--wrapper_script_flag=--debug
--test_output=streamed
--test_strategy=exclusive
--test_timeout=9999
--nocache_test_results
--[no]java_deps default: "true"
Generate dependency information (for now, compile-time classpath) per Java target.
--[no]java_header_compilation default: "true"
Compile ijars directly from source.
--java_language_version =<a string> default: "8"
The Java language version
--java_launcher =<a build target label> default: see description
The Java launcher to use when building Java binaries. If this flag is set to the empty string, the JDK launcher is used. The "launcher" attribute overrides this flag.
--java_runtime_version =<a string> default: "local_jdk"
The Java runtime version
--javacopt =<a string> multiple uses are accumulated
Additional options to pass to javac.
--jvmopt =<a string> multiple uses are accumulated
Additional options to pass to the Java VM. These options will get added to the VM startup options of each java_binary target.
--legacy_main_dex_list_generator =<a build target label> default: see description
Specifies a binary to use to generate the list of classes that must be in the main dex when compiling legacy multidex.
--plugin =<a build target label> multiple uses are accumulated
Plugins to use in the build. Currently works with java_plugin.
--proguard_top =<a build target label> default: see description
Specifies which version of ProGuard to use for code removal when building a Java binary.
--proto_compiler =<a build target label> default: "@com_google_protobuf//:protoc"
The label of the proto-compiler.
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_cc =<a build target label> default: "@com_google_protobuf//:cc_toolchain"
Label of proto_lang_toolchain() which describes how to compile C++ protos
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_j2objc =<a build target label> default: "@bazel_tools//tools/j2objc:j2objc_proto_toolchain"
Label of proto_lang_toolchain() which describes how to compile j2objc protos
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_java =<a build target label> default: "@com_google_protobuf//:java_toolchain"
Label of proto_lang_toolchain() which describes how to compile Java protos
Tags: affects_outputs , loading_and_analysis
--proto_toolchain_for_javalite =<a build target label> default: "@com_google_protobuf//:javalite_toolchain"
Label of proto_lang_toolchain() which describes how to compile JavaLite protos
Tags: affects_outputs , loading_and_analysis
--protocopt =<a string> multiple uses are accumulated
Additional options to pass to the protobuf compiler.
Tags: affects_outputs
--[no]runs_per_test_detects_flakes default: "false"
If true, any shard in which at least one run/attempt passes and at least one run/attempt fails gets a FLAKY status.
--shell_executable =<a path> default: see description
Absolute path to the shell executable for Bazel to use. If this is unset, but the BAZEL_SH environment variable is set on the first Bazel invocation (that starts up a Bazel server), Bazel uses that. If neither is set, Bazel uses a hard-coded default path depending on the operating system it runs on (Windows: c:/tools/msys64/usr/bin/bash.exe, FreeBSD: /usr/local/bin/bash, all others: /bin/bash). Note that using a shell that is not compatible with bash may lead to build failures or runtime failures of the generated binaries.
Tags: loading_and_analysis
--test_arg =<a string> multiple uses are accumulated
Specifies additional options and arguments that should be passed to the test executable. Can be used multiple times to specify several arguments. If multiple tests are executed, each of them will receive identical arguments. Used only by the 'bazel test' command.
--test_filter =<a string> default: see description
Specifies a filter to forward to the test framework. Used to limit the tests run. Note that this does not affect which targets are built.
--test_result_expiration =<an integer> default: "-1"
This option is deprecated and has no effect.
--[no]test_runner_fail_fast default: "false"
Forwards fail fast option to the test runner. The test runner should stop execution upon first failure.
--test_sharding_strategy =<explicit or disabled> default: "explicit"
Specify strategy for test sharding: 'explicit' to only use sharding if the 'shard_count' BUILD attribute is present. 'disabled' to never use test sharding.
--tool_java_language_version =<a string> default: "8"
The Java language version used to execute the tools that are needed during a build
--tool_java_runtime_version =<a string> default: "remotejdk_11"
The Java runtime version used to execute tools during the build
--[no]use_ijars default: "true"
If enabled, this option causes Java compilation to use interface jars. This will result in faster incremental compilation, but error messages can be different.

Dump Options

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that control the output of the command:
--[no]action_cache default: "false"
Dump action cache content.
Tags: bazel_monitoring
--[no]packages default: "false"
Dump package cache content.
Tags: bazel_monitoring
--[no]rule_classes default: "false"
Dump rule classes.
Tags: bazel_monitoring
--[no]rules default: "false"
Dump rules, including counts and memory usage (if memory is tracked).
Tags: bazel_monitoring
--skyframe =<off, summary, count or detailed> default: "off"
Dump Skyframe graph: 'off', 'summary', 'count', or 'detailed'.
Tags: bazel_monitoring
--skyfunction_filter =<a comma-separated list of regex expressions with prefix '-' specifying excluded paths> default: ".*"
Regex filter of SkyFunction names to output. Only used with --skyframe=detailed.
Tags: bazel_monitoring
--skylark_memory =<a string> default: see description
Dumps a pprof-compatible memory profile to the specified path. To learn more please see https://github.com/google/pprof.
Tags: bazel_monitoring
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.

Fetch Options

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that control build execution:
If set to true, Bazel will represent symlinks in action outputs in the remote caching/execution protocol as such. The current behavior is for remote caches/executors to follow symlinks and represent them as files. See #6631 for details.
Tags: execution , incompatible_change
--[no]keep_going [ -k ] default: "false"
Continue as much as possible after an error. While the target that failed and those that depend on it cannot be analyzed, other prerequisites of these targets can be.
Tags: eagerness_to_exit
--loading_phase_threads =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> default: "auto"
Number of parallel threads to use for the loading/analysis phase.Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". "auto" sets a reasonable default based on host resources. Must be at least 1.
Tags: bazel_internal_configuration
If true, upload action symlink outputs to the remote cache. If this option is not enabled, cachable actions that output symlinks will fail.
Tags: execution
Options that let the user configure the intended output, affecting its value, as opposed to its existence:
--bep_maximum_open_remote_upload_files =<an integer> default: "-1"
Maximum number of open files allowed during BEP artifact upload.
Tags: affects_outputs
--remote_download_minimal
Does not download any remote build outputs to the local machine. This flag is a shortcut for three flags: --experimental_inmemory_jdeps_files, --experimental_inmemory_dotd_files and --remote_download_outputs=minimal.
Expands to:
--nobuild_runfile_links
--experimental_inmemory_jdeps_files
--experimental_inmemory_dotd_files
--remote_download_outputs=minimal

Tags: affects_outputs
--remote_download_outputs =<all, minimal or toplevel> default: "all"
If set to 'minimal' doesn't download any remote build outputs to the local machine, except the ones required by local actions. If set to 'toplevel' behaves like'minimal' except that it also downloads outputs of top level targets to the local machine. Both options can significantly reduce build times if network bandwidth is a bottleneck.
Tags: affects_outputs
Instead of downloading remote build outputs to the local machine, create symbolic links. The target of the symbolic links can be specified in the form of a template string. This template string may contain {hash} and {size_bytes} that expand to the hash of the object and the size in bytes, respectively. These symbolic links may, for example, point to a FUSE file system that loads objects from the CAS on demand.
Tags: affects_outputs
--remote_download_toplevel
Only downloads remote outputs of top level targets to the local machine. This flag is a shortcut for three flags: --experimental_inmemory_jdeps_files, --experimental_inmemory_dotd_files and --remote_download_outputs=toplevel.
Expands to:
--experimental_inmemory_jdeps_files
--experimental_inmemory_dotd_files
--remote_download_outputs=toplevel

Tags: affects_outputs
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
--[no]incompatible_config_setting_private_default_visibility default: "false"
If incompatible_enforce_config_setting_visibility=false, this is a noop. Else, if this flag is false, any config_setting without an explicit visibility attribute is //visibility:public. If this flag is true, config_setting follows the same visibility logic as all other rules. See https://github.com/bazelbuild/bazel/issues/12933.
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enforce_config_setting_visibility default: "false"
If true, enforce config_setting visibility restrictions. If false, every config_setting is visible to every target. See https://github.com/bazelbuild/bazel/issues/12932.
Tags: loading_and_analysis , incompatible_change
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
--experimental_repository_resolved_file =<a string> default: ""
If non-empty, write a Starlark value with the resolved information of all Starlark repository rules that were executed.
Tags: affects_outputs
--remote_print_execution_messages =<failure, success or all> default: "failure"
Choose when to print remote execution messages. Valid values are `failure`, to print only on failures, `success` to print only on successes and `all` to print always.
Tags: terminal_output
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
--[no]experimental_guard_against_concurrent_changes default: "false"
Turn this off to disable checking the ctime of input files of an action before uploading it to a remote cache. There may be cases where the Linux kernel delays writing of files, which could cause false positives.
--[no]experimental_remote_cache_async default: "false"
If true, remote cache I/O will happen in the background instead of taking place as the part of a spawn.
--[no]experimental_remote_cache_compression default: "false"
If enabled, compress/decompress cache blobs with zstd.
--experimental_remote_capture_corrupted_outputs =<a path> default: see description
A path to a directory where the corrupted outputs will be captured to.
--experimental_remote_downloader =<a string> default: see description
A Remote Asset API endpoint URI, to be used as a remote download proxy. The supported schemas are grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. See: https://github.com/bazelbuild/remote-apis/blob/master/build/bazel/remote/asset/v1/remote_asset.proto
--[no]experimental_remote_execution_keepalive default: "false"
Whether to use keepalive for remote execution calls.
--experimental_remote_grpc_log =<a path> default: see description
If specified, a path to a file to log gRPC call related details. This log consists of a sequence of serialized com.google.devtools.build.lib.remote.logging.RemoteExecutionLog.LogEntry protobufs with each message prefixed by a varint denoting the size of the following serialized protobuf message, as performed by the method LogEntry.writeDelimitedTo(OutputStream).
--[no]experimental_remote_merkle_tree_cache default: "false"
If set to true, Merkle tree calculations will be memoized to improve the remote cache hit checking speed. The memory foot print of the cache is controlled by --experimental_remote_merkle_tree_cache_size.
--experimental_remote_merkle_tree_cache_size =<a long integer> default: "1000"
The number of Merkle trees to memoize to improve the remote cache hit checking speed. Even though the cache is automatically pruned according to Java's handling of soft references, out-of-memory errors can occur if set too high. If set to 0 the cache size is unlimited. Optimal value varies depending on project's size. Default to 1000.
--[no]incompatible_remote_build_event_upload_respect_no_cache default: "false"
If set to true, outputs referenced by BEP are not uploaded to remote cache if the generating action cannot be cached remotely.
--[no]incompatible_remote_output_paths_relative_to_input_root default: "false"
If set to true, output paths are relative to input root instead of working directory.
Tags: incompatible_change
--[no]incompatible_remote_results_ignore_disk default: "false"
If set to true, --noremote_upload_local_results and --noremote_accept_cached will not apply to the disk cache. If a combined cache is used: --noremote_upload_local_results will cause results to be written to the disk cache, but not uploaded to the remote cache. --noremote_accept_cached will result in Bazel checking for results in the disk cache, but not in the remote cache. no-remote-exec actions can hit the disk cache. See #8216 for details.
Tags: incompatible_change
--[no]remote_accept_cached default: "true"
Whether to accept remotely cached action results.
--remote_bytestream_uri_prefix =<a string> default: see description
The hostname and instance name to be used in bytestream:// URIs that are written into build event streams. This option can be set when builds are performed using a proxy, which causes the values of --remote_executor and --remote_instance_name to no longer correspond to the canonical name of the remote execution service. When not set, it will default to "${hostname}/${instance_name}".
--remote_cache =<a string> default: see description
A URI of a caching endpoint. The supported schemas are http, https, grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. Specify grpc://, http:// or unix: schema to disable TLS. See https://dbaze.build/docs/remote-caching
--remote_cache_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in cache requests: --remote_cache_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_default_exec_properties =<a 'name=value' assignment> multiple uses are accumulated
Set the default exec properties to be used as the remote execution platform if an execution platform does not already set exec_properties.
Tags: affects_outputs
--remote_default_platform_properties =<a string> default: ""
Set the default platform properties to be set for the remote execution API, if the execution platform does not already set remote_execution_properties. This value will also be used if the host platform is selected as the execution platform for remote execution.
--remote_downloader_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in remote downloader requests: --remote_downloader_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_exec_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in execution requests: --remote_exec_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_execution_priority =<an integer> default: "0"
The relative priority of actions to be executed remotely. The semantics of the particular priority values are server-dependent.
--remote_executor =<a string> default: see description
HOST or HOST:PORT of a remote execution endpoint. The supported schemas are grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. Specify grpc:// or unix: schema to disable TLS.
--remote_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in requests: --remote_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_instance_name =<a string> default: ""
Value to pass as instance_name in the remote execution API.
--[no]remote_local_fallback default: "false"
Whether to fall back to standalone local execution strategy if remote execution fails.
--remote_local_fallback_strategy =<a string> default: "local"
No-op, deprecated. See https://github.com/bazelbuild/bazel/issues/7480 for details.
--remote_max_connections =<an integer> default: "100"
Limit the max number of concurrent connections to remote cache/executor. By default the value is 100. Setting this to 0 means no limitation. For HTTP remote cache, one TCP connection could handle one request at one time, so Bazel could make up to --remote_max_connections concurrent requests. For gRPC remote cache/executor, one gRPC channel could usually handle 100+ concurrent requests, so Bazel could make around `--remote_max_connections * 100` concurrent requests.
Tags: host_machine_resource_optimizations
--remote_proxy =<a string> default: see description
Connect to the remote cache through a proxy. Currently this flag can only be used to configure a Unix domain socket (unix:/path/to/socket).
--remote_result_cache_priority =<an integer> default: "0"
The relative priority of remote actions to be stored in remote cache. The semantics of the particular priority values are server-dependent.
--remote_retries =<an integer> default: "5"
The maximum number of attempts to retry a transient error. If set to 0, retries are disabled.
--remote_timeout =<An immutable length of time.> default: "60s"
The maximum amount of time to wait for remote execution and cache calls. For the REST cache, this is both the connect and the read timeout. Following units can be used: Days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms). If the unit is omitted, the value is interpreted as seconds.
--[no]remote_upload_local_results default: "true"
Whether to upload locally executed action results to the remote cache.
--[no]remote_verify_downloads default: "true"
If set to true, Bazel will compute the hash sum of all remote downloads and discard the remotely cached values if they don't match the expected value.
Miscellaneous options, not otherwise categorized.:
--deleted_packages =<comma-separated list of package names> default: ""
A comma-separated list of names of packages which the build system will consider non-existent, even if they are visible somewhere on the package path. Use this option when deleting a subpackage 'x/y' of an existing package 'x'. For example, after deleting x/y/BUILD in your client, the build system may complain if it encounters a label '//x:y/z' if that is still provided by another package_path entry. Specifying --deleted_packages x/y avoids this problem.
--disk_cache =<a path> default: see description
A path to a directory where Bazel can read and write actions and action outputs. If the directory does not exist, it will be created.
--google_auth_scopes =<comma-separated list of options> default: "https://www.googleapis.com/auth/cloud-platform"
A comma-separated list of Google Cloud authentication scopes.
--google_credentials =<a string> default: see description
Specifies the file to get authentication credentials from. See https://cloud.google.com/docs/authentication for details.
--[no]google_default_credentials default: "false"
Whether to use 'Google Application Default Credentials' for authentication. See https://cloud.google.com/docs/authentication for details. Disabled by default.
--grpc_keepalive_time =<An immutable length of time.> default: see description
Configures keep-alive pings for outgoing gRPC connections. If this is set, then Bazel sends pings after this much time of no read operations on the connection, but only if there is at least one pending gRPC call. Times are treated as second granularity; it is an error to set a value less than one second. By default, keep-alive pings are disabled. You should coordinate with the service owner before enabling this setting.
--grpc_keepalive_timeout =<An immutable length of time.> default: "20s"
Configures a keep-alive timeout for outgoing gRPC connections. If keep-alive pings are enabled with --grpc_keepalive_time, then Bazel times out a connection if it does not receive a ping reply after this much time. Times are treated as second granularity; it is an error to set a value less than one second. If keep-alive pings are disabled, then this setting is ignored.
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.
--package_path =<colon-separated list of options> default: "%workspace%"
A colon-separated list of where to look for packages. Elements beginning with '%workspace%' are relative to the enclosing workspace. If omitted or empty, the default is the output of 'bazel info default-package-path'.
--[no]show_loading_progress default: "true"
If enabled, causes Bazel to print "Loading package:" messages.
--tls_certificate =<a string> default: see description
Specify a path to a TLS certificate that is trusted to sign server certificates.
--tls_client_certificate =<a string> default: see description
Specify the TLS client certificate to use; you also need to provide a client key to enable client authentication.
--tls_client_key =<a string> default: see description
Specify the TLS client key to use; you also need to provide a client certificate to enable client authentication.

Help Options

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
--help_verbosity =<long, medium or short> default: "medium"
Select the verbosity of the help command.
Tags: affects_outputs , terminal_output
--long [ -l ]
Show full description of each option, instead of just its name.
Expands to:
--help_verbosity=long

Tags: affects_outputs , terminal_output
--short
Show only the names of the options, not their types or meanings.
Expands to:
--help_verbosity=short

Tags: affects_outputs , terminal_output
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.

Info Options

Inherits all options from build .

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
--[no]show_make_env default: "false"
Include the "Make" environment in the output.
Tags: affects_outputs , terminal_output
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.

License Options

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.

Mobile-install Options

Inherits all options from build .

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that control build execution:
--mode =<classic, classic_internal_test_do_not_use or skylark> default: "classic"
Select how to run mobile-install. "classic" runs the current version of mobile-install. "skylark" uses the new Starlark version, which has support for android_test.
Tags: loading_and_analysis , execution , incompatible_change
Options that configure the toolchain used for action execution:
--adb =<a string> default: ""
adb binary to use for the 'mobile-install' command. If unspecified, the one in the Android SDK specified by the --android_sdk command line option (or the default SDK if --android_sdk is not specified) is used.
Tags: changes_inputs
Options that control the output of the command:
--[no]incremental default: "false"
Whether to do an incremental install. If true, try to avoid unnecessary additional work by reading the state of the device the code is to be installed on and using that information to avoid unnecessary work. If false (the default), always do a full install.
Tags: loading_and_analysis
--[no]split_apks default: "false"
Whether to use split apks to install and update the application on the device. Works only with devices with Marshmallow or later
Tags: loading_and_analysis , affects_outputs
Options that let the user configure the intended output, affecting its value, as opposed to its existence:
--adb_arg =<a string> multiple uses are accumulated
Extra arguments to pass to adb. Usually used to designate a device to install to.
Tags: action_command_lines
--debug_app
Whether to wait for the debugger before starting the app.
Expands to:
--start=DEBUG

Tags: execution
--device =<a string> default: ""
The adb device serial number. If not specified, the first device will be used.
Tags: action_command_lines
--start =<no, cold, warm or debug> default: "NO"
How the app should be started after installing it. Set to WARM to preserve and restore application state on incremental installs.
Tags: execution
--start_app
Whether to start the app after installing it.
Expands to:
--start=COLD

Tags: execution
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
--incremental_install_verbosity =<a string> default: ""
The verbosity for incremental install. Set to 1 for debug logging.
Tags: bazel_monitoring
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.

Modquery Options

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that control build execution:
--[no]keep_going [ -k ] default: "false"
Continue as much as possible after an error. While the target that failed and those that depend on it cannot be analyzed, other prerequisites of these targets can be.
Tags: eagerness_to_exit
--loading_phase_threads =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> default: "auto"
Number of parallel threads to use for the loading/analysis phase.Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". "auto" sets a reasonable default based on host resources. Must be at least 1.
Tags: bazel_internal_configuration
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
--[no]incompatible_config_setting_private_default_visibility default: "false"
If incompatible_enforce_config_setting_visibility=false, this is a noop. Else, if this flag is false, any config_setting without an explicit visibility attribute is //visibility:public. If this flag is true, config_setting follows the same visibility logic as all other rules. See https://github.com/bazelbuild/bazel/issues/12933.
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enforce_config_setting_visibility default: "false"
If true, enforce config_setting visibility restrictions. If false, every config_setting is visible to every target. See https://github.com/bazelbuild/bazel/issues/12932.
Tags: loading_and_analysis , incompatible_change
Options relating to modquery output and semantics:
--charset =<utf8 or ascii> default: "utf8"
Chooses the character set to use for the tree. Only affects text output. Valid values are "utf8" or "ascii". Default is "utf8"
Tags: terminal_output
--[no]cycles default: "false"
Points out dependency cycles inside the displayed tree, which are normally ignored by default.
Tags: execution
--depth =<an integer> default: "2147483647"
Maximum display depth of the dependency tree. A depth of 1 displays the direct dependencies, for example. For tree, path and all_paths it defaults to Integer.MAX_VALUE, while for explain it defaults to 1 (only displays direct deps of the root besides the leaves and their parents).
Tags: execution
--[no]extra default: "false"
The queries will also display the reason why modules were resolved to their current version (if changed). Defaults to true only for the explain query.
Tags: execution
--from =<a list of <module>s separated by comma> default: "root"
The module(s) starting from which the dependency graph query will be displayed. Check each query?s description for the exact semantic. Defaults to root.
Tags: execution
--output =<text, json or graph> default: "text"
The format in which the query results should be printed. Allowed values for query are: text, json, graph
Tags: terminal_output
--prefix =<indent, depth or none> default: "indent"
Sets how each line is displayed (only affects `text` output). The prefix value can be one of "indent", "depth" or "none". The default is "indent"
Tags: terminal_output
--[no]unused default: "false"
The queries will also take into account and display the unused modules, which are not present in the module resolution graph after selection (due to the Minimal-Version Selection or override rules). This can have different effects for each of the query types ie include new paths in the all_paths command, or extra dependants in the explain command.
Tags: execution
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--deleted_packages =<comma-separated list of package names> default: ""
A comma-separated list of names of packages which the build system will consider non-existent, even if they are visible somewhere on the package path. Use this option when deleting a subpackage 'x/y' of an existing package 'x'. For example, after deleting x/y/BUILD in your client, the build system may complain if it encounters a label '//x:y/z' if that is still provided by another package_path entry. Specifying --deleted_packages x/y avoids this problem.
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.
--package_path =<colon-separated list of options> default: "%workspace%"
A colon-separated list of where to look for packages. Elements beginning with '%workspace%' are relative to the enclosing workspace. If omitted or empty, the default is the output of 'bazel info default-package-path'.
--[no]show_loading_progress default: "true"
If enabled, causes Bazel to print "Loading package:" messages.

Inherits all options from build .

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
Miscellaneous options, not otherwise categorized.:
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.
--print_action_mnemonics =<a string> multiple uses are accumulated
Lists which mnemonics to filter print_action data by, no filtering takes place when left empty.

Query Options

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis , experimental
--[no]experimental_repository_disable_download default: "false"
If set, downloading external repositories is not allowed.
Tags: experimental
--experimental_repository_downloader_retries =<an integer> default: "0"
The maximum number of attempts to retry a download error. If set to 0, retries are disabled.
Tags: experimental
--experimental_scale_timeouts =<a double> default: "1.0"
Scale all timeouts in Starlark repository rules by this factor. In this way, external repositories can be made working on machines that are slower than the rule author expected, without changing the source code
Tags: bazel_internal_configuration , experimental
--http_timeout_scaling =<a double> default: "1.0"
Scale all timeouts related to http downloads by the given factor
Tags: bazel_internal_configuration
--[no]ignore_dev_dependency default: "false"
If true, Bazel ignores `bazel_dep` and `use_extension` declared as `dev_dependency` in the MODULE.bazel of the root module. Note that, those dev dependencies are always ignored in the MODULE.bazel if it's not the root module regardless of the value of this flag.
Tags: loading_and_analysis
--registry =<a string> multiple uses are accumulated
Specifies the registries to use to locate Bazel module dependencies. The order is important: modules will be looked up in earlier registries first, and only fall back to later registries when they're missing from the earlier ones.
Tags: changes_inputs
--repository_cache =<a path> default: see description
Specifies the cache location of the downloaded values obtained during the fetching of external repositories. An empty string as argument requests the cache to be disabled.
Tags: bazel_internal_configuration
Options that control build execution:
If set to true, Bazel will represent symlinks in action outputs in the remote caching/execution protocol as such. The current behavior is for remote caches/executors to follow symlinks and represent them as files. See #6631 for details.
Tags: execution , incompatible_change
--[no]keep_going [ -k ] default: "false"
Continue as much as possible after an error. While the target that failed and those that depend on it cannot be analyzed, other prerequisites of these targets can be.
Tags: eagerness_to_exit
--loading_phase_threads =<an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5"> default: "auto"
Number of parallel threads to use for the loading/analysis phase.Takes an integer, or a keyword ("auto", "HOST_CPUS", "HOST_RAM"), optionally followed by an operation ([-|*]<float>) eg. "auto", "HOST_CPUS*.5". "auto" sets a reasonable default based on host resources. Must be at least 1.
Tags: bazel_internal_configuration
If true, upload action symlink outputs to the remote cache. If this option is not enabled, cachable actions that output symlinks will fail.
Tags: execution
Options that let the user configure the intended output, affecting its value, as opposed to its existence:
--bep_maximum_open_remote_upload_files =<an integer> default: "-1"
Maximum number of open files allowed during BEP artifact upload.
Tags: affects_outputs
--remote_download_minimal
Does not download any remote build outputs to the local machine. This flag is a shortcut for three flags: --experimental_inmemory_jdeps_files, --experimental_inmemory_dotd_files and --remote_download_outputs=minimal.
Expands to:
--nobuild_runfile_links
--experimental_inmemory_jdeps_files
--experimental_inmemory_dotd_files
--remote_download_outputs=minimal

Tags: affects_outputs
--remote_download_outputs =<all, minimal or toplevel> default: "all"
If set to 'minimal' doesn't download any remote build outputs to the local machine, except the ones required by local actions. If set to 'toplevel' behaves like'minimal' except that it also downloads outputs of top level targets to the local machine. Both options can significantly reduce build times if network bandwidth is a bottleneck.
Tags: affects_outputs
Instead of downloading remote build outputs to the local machine, create symbolic links. The target of the symbolic links can be specified in the form of a template string. This template string may contain {hash} and {size_bytes} that expand to the hash of the object and the size in bytes, respectively. These symbolic links may, for example, point to a FUSE file system that loads objects from the CAS on demand.
Tags: affects_outputs
--remote_download_toplevel
Only downloads remote outputs of top level targets to the local machine. This flag is a shortcut for three flags: --experimental_inmemory_jdeps_files, --experimental_inmemory_dotd_files and --remote_download_outputs=toplevel.
Expands to:
--experimental_inmemory_jdeps_files
--experimental_inmemory_dotd_files
--remote_download_outputs=toplevel

Tags: affects_outputs
Options that affect how strictly Bazel enforces valid build inputs (rule definitions, flag combinations, etc.):
--experimental_repository_hash_file =<a string> default: ""
If non-empty, specifies a file containing a resolved value, against which the repository directory hashes should be verified
Tags: affects_outputs , experimental
--experimental_verify_repository_rules =<a string> multiple uses are accumulated
If list of repository rules for which the hash of the output directory should be verified, provided a file is specified by --experimental_repository_hash_file.
Tags: affects_outputs , experimental
This option affects semantics of the Starlark language or the build API accessible to BUILD files, .bzl files, or WORKSPACE files.:
--[no]experimental_allow_top_level_aspects_parameters default: "true"
No-op
Tags: no_op , deprecated , experimental
--[no]incompatible_config_setting_private_default_visibility default: "false"
If incompatible_enforce_config_setting_visibility=false, this is a noop. Else, if this flag is false, any config_setting without an explicit visibility attribute is //visibility:public. If this flag is true, config_setting follows the same visibility logic as all other rules. See https://github.com/bazelbuild/bazel/issues/12933.
Tags: loading_and_analysis , incompatible_change
--[no]incompatible_enforce_config_setting_visibility default: "false"
If true, enforce config_setting visibility restrictions. If false, every config_setting is visible to every target. See https://github.com/bazelbuild/bazel/issues/12932.
Tags: loading_and_analysis , incompatible_change
Options relating to query output and semantics:
--aspect_deps =<off, conservative or precise> default: "conservative"
How to resolve aspect dependencies when the output format is one of {xml,proto,record}. 'off' means no aspect dependencies are resolved, 'conservative' (the default) means all declared aspect dependencies are added regardless of whether they are given the rule class of direct dependencies, 'precise' means that only those aspects are added that are possibly active given the rule class of the direct dependencies. Note that precise mode requires loading other packages to evaluate a single target thus making it slower than the other modes. Also note that even precise mode is not completely precise: the decision whether to compute an aspect is decided in the analysis phase, which is not run during 'bazel query'.
Tags: build_file_semantics
--[no]experimental_graphless_query default: "auto"
If true, uses a Query implementation that does not make a copy of the graph. The new implementation only supports --order_output=no, as well as only a subset of output formatters.
Tags: build_file_semantics , eagerness_to_exit
--graph:conditional_edges_limit =<an integer> default: "4"
The maximum number of condition labels to show. -1 means no truncation and 0 means no annotation. This option is only applicable to --output=graph.
Tags: terminal_output
--[no]graph:factored default: "true"
If true, then the graph will be emitted 'factored', ie topologically-equivalent nodes will be merged together and their labels concatenated. This option is only applicable to --output=graph.
Tags: terminal_output
--graph:node_limit =<an integer> default: "512"
The maximum length of the label string for a graph node in the output. Longer labels will be truncated; -1 means no truncation. This option is only applicable to --output=graph.
Tags: terminal_output
--[no]implicit_deps default: "true"
If enabled, implicit dependencies will be included in the dependency graph over which the query operates. An implicit dependency is one that is not explicitly specified in the BUILD file but added by bazel. For cquery, this option controls filtering resolved toolchains.
Tags: build_file_semantics
--[no]include_aspects default: "true"
aquery, cquery: whether to include aspect-generated actions in the output. query: no-op (aspects are always followed).
Tags: terminal_output
--[no]incompatible_display_source_file_location default: "true"
True by default, displays the target of the source file. If true, displays the location of line 1 of source files in location outputs. This flag only exists for migration purposes.
Tags: terminal_output , incompatible_change
--[no]incompatible_lexicographical_output default: "true"
If this option is set, sorts --order_output=auto output in lexicographical order.
Tags: terminal_output , incompatible_change
--[no]infer_universe_scope default: "false"
If set and --universe_scope is unset, then a value of --universe_scope will be inferred as the list of unique target patterns in the query expression. Note that the --universe_scope value inferred for a query expression that uses universe-scoped functions (eg`allrdeps`) may not be what you want, so you should use this option only if you know what you are doing. See https://bazel.build/reference/query#sky-query for details and examples. If --universe_scope is set, then this option's value is ignored. Note: this option applies only to `query` (ie not `cquery`).
Tags: loading_and_analysis
--[no]line_terminator_null default: "false"
Whether each format is terminated with \0 instead of newline.
Tags: terminal_output
--[no]nodep_deps default: "true"
If enabled, deps from "nodep" attributes will be included in the dependency graph over which the query operates. A common example of a "nodep" attribute is "visibility". Run and parse the output of `info build-language` to learn about all the "nodep" attributes in the build language.
Tags: build_file_semantics
--noorder_results
Output the results in dependency-ordered (default) or unordered fashion. The unordered output is faster but only supported when --output is not minrank, maxrank, or graph.
Expands to:
--order_output=no

Tags: terminal_output
--null
Whether each format is terminated with \0 instead of newline.
Expands to:
--line_terminator_null=true

Tags: terminal_output
--order_output =<no, deps, auto or full> default: "auto"
Output the results unordered (no), dependency-ordered (deps), or fully ordered (full). The default is 'auto', meaning that results are output either dependency-ordered or fully ordered, depending on the output formatter (dependency-ordered for proto, minrank, maxrank, and graph, fully ordered for all others). When output is fully ordered, nodes are printed in a fully deterministic (total) order. First, all nodes are sorted alphabetically. Then, each node in the list is used as the start of a post-order depth-first search in which outgoing edges to unvisited nodes are traversed in alphabetical order of the successor nodes. Finally, nodes are printed in the reverse of the order in which they were visited.
Tags: terminal_output
--order_results
Output the results in dependency-ordered (default) or unordered fashion. The unordered output is faster but only supported when --output is not minrank, maxrank, or graph.
Expands to:
--order_output=auto

Tags: terminal_output
--output =<a string> default: "label"
The format in which the query results should be printed. Allowed values for query are: build, graph, label, label_kind, location, maxrank, minrank, package, proto, xml.
Tags: terminal_output
--[no]proto:default_values default: "true"
If true, attributes whose value is not explicitly specified in the BUILD file are included; otherwise they are omitted. This option is applicable to --output=proto
Tags: terminal_output
--[no]proto:definition_stack default: "false"
Populate the definition_stack proto field, which records for each rule instance the Starlark call stack at the moment the rule's class was defined.
Tags: terminal_output
--[no]proto:flatten_selects default: "true"
If enabled, configurable attributes created by select() are flattened. For list types the flattened representation is a list containing each value of the select map exactly once. Scalar types are flattened to null.
Tags: build_file_semantics
--[no]proto:include_synthetic_attribute_hash default: "false"
Whether or not to calculate and populate the $internal_attr_hash attribute.
Tags: terminal_output
--[no]proto:instantiation_stack default: "false"
Populate the instantiation call stack of each rule. Note that this requires the stack to be present
Tags: terminal_output
--[no]proto:locations default: "true"
Whether to output location information in proto output at all.
Tags: terminal_output
--proto:output_rule_attrs =<comma-separated list of options> default: "all"
Comma separated list of attributes to include in output. Defaults to all attributes. Set to empty string to not output any attribute. This option is applicable to --output=proto.
Tags: terminal_output
--[no]proto:rule_inputs_and_outputs default: "true"
Whether or not to populate the rule_input and rule_output fields.
Tags: terminal_output
--query_file =<a string> default: ""
If set, query will read the query from the file named here, rather than on the command line. It is an error to specify a file here as well as a command-line query.
Tags: changes_inputs
--[no]relative_locations default: "false"
If true, the location of BUILD files in xml and proto outputs will be relative. By default, the location output is an absolute path and will not be consistent across machines. You can set this option to true to have a consistent result across machines.
Tags: terminal_output
--[no]strict_test_suite default: "false"
If true, the tests() expression gives an error if it encounters a test_suite containing non-test targets.
Tags: build_file_semantics , eagerness_to_exit
--[no]tool_deps default: "true"
Query: If disabled, dependencies on 'host configuration' or 'execution' targets will not be included in the dependency graph over which the query operates. A 'host configuration' dependency edge, such as the one from any 'proto_library' rule to the Protocol Compiler, usually points to a tool executed during the build rather than a part of the same 'target' program. Cquery: If disabled, filters out all configured targets which cross a host or execution transition from the top-level target that discovered this configured target. That means if the top-level target is in the target configuration, only configured targets also in the target configuration will be returned. If the top-level target is in the host configuration, only host configured targets will be returned. This option will NOT exclude resolved toolchains.
Tags: build_file_semantics
--universe_scope =<comma-separated list of options> default: ""
A comma-separated set of target patterns (additive and subtractive). The query may be performed in the universe defined by the transitive closure of the specified targets. This option is used for the query and cquery commands. For cquery, the input to this option is the targets all answers are built under and so this option may affect configurations and transitions. If this option is not specified, the top-level targets are assumed to be the targets parsed from the query expression. Note: For cquery, not specifying this option may cause the build to break if targets parsed from the query expression are not buildable with top-level options.
Tags: loading_and_analysis
--[no]xml:default_values default: "false"
If true, rule attributes whose value is not explicitly specified in the BUILD file are printed; otherwise they are omitted.
Tags: terminal_output
--[no]xml:line_numbers default: "true"
If true, XML output contains line numbers. Disabling this option may make diffs easier to read. This option is only applicable to --output=xml.
Tags: terminal_output
Options that affect the verbosity, format or location of logging:
--[no]experimental_record_metrics_for_all_mnemonics default: "false"
By default the number of action types is limited to the 20 mnemonics with the largest number of executed actions. Setting this option will write statistics for all mnemonics.
--experimental_repository_resolved_file =<a string> default: ""
If non-empty, write a Starlark value with the resolved information of all Starlark repository rules that were executed.
Tags: affects_outputs
--remote_print_execution_messages =<failure, success or all> default: "failure"
Choose when to print remote execution messages. Valid values are `failure`, to print only on failures, `success` to print only on successes and `all` to print always.
Tags: terminal_output
Options specifying or altering a generic input to a Bazel command that does not fall into other categories.:
--experimental_resolved_file_instead_of_workspace =<a string> default: ""
If non-empty read the specified resolved file instead of the WORKSPACE file
Tags: changes_inputs
Remote caching and execution options:
--experimental_downloader_config =<a string> default: see description
Specify a file to configure the remote downloader with. This file consists of lines, each of which starts with a directive (`allow`, `block` or `rewrite`) followed by either a host name (for `allow` and `block`) or two patterns, one to match against, and one to use as a substitute URL, with back-references starting from `$1`. It is possible for multiple `rewrite` directives for the same URL to be give, and in this case multiple URLs will be returned.
--[no]experimental_guard_against_concurrent_changes default: "false"
Turn this off to disable checking the ctime of input files of an action before uploading it to a remote cache. There may be cases where the Linux kernel delays writing of files, which could cause false positives.
--[no]experimental_remote_cache_async default: "false"
If true, remote cache I/O will happen in the background instead of taking place as the part of a spawn.
--[no]experimental_remote_cache_compression default: "false"
If enabled, compress/decompress cache blobs with zstd.
--experimental_remote_capture_corrupted_outputs =<a path> default: see description
A path to a directory where the corrupted outputs will be captured to.
--experimental_remote_downloader =<a string> default: see description
A Remote Asset API endpoint URI, to be used as a remote download proxy. The supported schemas are grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. See: https://github.com/bazelbuild/remote-apis/blob/master/build/bazel/remote/asset/v1/remote_asset.proto
--[no]experimental_remote_execution_keepalive default: "false"
Whether to use keepalive for remote execution calls.
--experimental_remote_grpc_log =<a path> default: see description
If specified, a path to a file to log gRPC call related details. This log consists of a sequence of serialized com.google.devtools.build.lib.remote.logging.RemoteExecutionLog.LogEntry protobufs with each message prefixed by a varint denoting the size of the following serialized protobuf message, as performed by the method LogEntry.writeDelimitedTo(OutputStream).
--[no]experimental_remote_merkle_tree_cache default: "false"
If set to true, Merkle tree calculations will be memoized to improve the remote cache hit checking speed. The memory foot print of the cache is controlled by --experimental_remote_merkle_tree_cache_size.
--experimental_remote_merkle_tree_cache_size =<a long integer> default: "1000"
The number of Merkle trees to memoize to improve the remote cache hit checking speed. Even though the cache is automatically pruned according to Java's handling of soft references, out-of-memory errors can occur if set too high. If set to 0 the cache size is unlimited. Optimal value varies depending on project's size. Default to 1000.
--[no]incompatible_remote_build_event_upload_respect_no_cache default: "false"
If set to true, outputs referenced by BEP are not uploaded to remote cache if the generating action cannot be cached remotely.
--[no]incompatible_remote_output_paths_relative_to_input_root default: "false"
If set to true, output paths are relative to input root instead of working directory.
Tags: incompatible_change
--[no]incompatible_remote_results_ignore_disk default: "false"
If set to true, --noremote_upload_local_results and --noremote_accept_cached will not apply to the disk cache. If a combined cache is used: --noremote_upload_local_results will cause results to be written to the disk cache, but not uploaded to the remote cache. --noremote_accept_cached will result in Bazel checking for results in the disk cache, but not in the remote cache. no-remote-exec actions can hit the disk cache. See #8216 for details.
Tags: incompatible_change
--[no]remote_accept_cached default: "true"
Whether to accept remotely cached action results.
--remote_bytestream_uri_prefix =<a string> default: see description
The hostname and instance name to be used in bytestream:// URIs that are written into build event streams. This option can be set when builds are performed using a proxy, which causes the values of --remote_executor and --remote_instance_name to no longer correspond to the canonical name of the remote execution service. When not set, it will default to "${hostname}/${instance_name}".
--remote_cache =<a string> default: see description
A URI of a caching endpoint. The supported schemas are http, https, grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. Specify grpc://, http:// or unix: schema to disable TLS. See https://dbaze.build/docs/remote-caching
--remote_cache_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in cache requests: --remote_cache_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_default_exec_properties =<a 'name=value' assignment> multiple uses are accumulated
Set the default exec properties to be used as the remote execution platform if an execution platform does not already set exec_properties.
Tags: affects_outputs
--remote_default_platform_properties =<a string> default: ""
Set the default platform properties to be set for the remote execution API, if the execution platform does not already set remote_execution_properties. This value will also be used if the host platform is selected as the execution platform for remote execution.
--remote_downloader_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in remote downloader requests: --remote_downloader_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_exec_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in execution requests: --remote_exec_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_execution_priority =<an integer> default: "0"
The relative priority of actions to be executed remotely. The semantics of the particular priority values are server-dependent.
--remote_executor =<a string> default: see description
HOST or HOST:PORT of a remote execution endpoint. The supported schemas are grpc, grpcs (grpc with TLS enabled) and unix (local UNIX sockets). If no schema is provided Bazel will default to grpcs. Specify grpc:// or unix: schema to disable TLS.
--remote_header =<a 'name=value' assignment> multiple uses are accumulated
Specify a header that will be included in requests: --remote_header=Name=Value. Multiple headers can be passed by specifying the flag multiple times. Multiple values for the same name will be converted to a comma-separated list.
--remote_instance_name =<a string> default: ""
Value to pass as instance_name in the remote execution API.
--[no]remote_local_fallback default: "false"
Whether to fall back to standalone local execution strategy if remote execution fails.
--remote_local_fallback_strategy =<a string> default: "local"
No-op, deprecated. See https://github.com/bazelbuild/bazel/issues/7480 for details.
--remote_max_connections =<an integer> default: "100"
Limit the max number of concurrent connections to remote cache/executor. By default the value is 100. Setting this to 0 means no limitation. For HTTP remote cache, one TCP connection could handle one request at one time, so Bazel could make up to --remote_max_connections concurrent requests. For gRPC remote cache/executor, one gRPC channel could usually handle 100+ concurrent requests, so Bazel could make around `--remote_max_connections * 100` concurrent requests.
Tags: host_machine_resource_optimizations
--remote_proxy =<a string> default: see description
Connect to the remote cache through a proxy. Currently this flag can only be used to configure a Unix domain socket (unix:/path/to/socket).
--remote_result_cache_priority =<an integer> default: "0"
The relative priority of remote actions to be stored in remote cache. The semantics of the particular priority values are server-dependent.
--remote_retries =<an integer> default: "5"
The maximum number of attempts to retry a transient error. If set to 0, retries are disabled.
--remote_timeout =<An immutable length of time.> default: "60s"
The maximum amount of time to wait for remote execution and cache calls. For the REST cache, this is both the connect and the read timeout. Following units can be used: Days (d), hours (h), minutes (m), seconds (s), and milliseconds (ms). If the unit is omitted, the value is interpreted as seconds.
--[no]remote_upload_local_results default: "true"
Whether to upload locally executed action results to the remote cache.
--[no]remote_verify_downloads default: "true"
If set to true, Bazel will compute the hash sum of all remote downloads and discard the remotely cached values if they don't match the expected value.
Miscellaneous options, not otherwise categorized.:
--deleted_packages =<comma-separated list of package names> default: ""
A comma-separated list of names of packages which the build system will consider non-existent, even if they are visible somewhere on the package path. Use this option when deleting a subpackage 'x/y' of an existing package 'x'. For example, after deleting x/y/BUILD in your client, the build system may complain if it encounters a label '//x:y/z' if that is still provided by another package_path entry. Specifying --deleted_packages x/y avoids this problem.
--disk_cache =<a path> default: see description
A path to a directory where Bazel can read and write actions and action outputs. If the directory does not exist, it will be created.
--google_auth_scopes =<comma-separated list of options> default: "https://www.googleapis.com/auth/cloud-platform"
A comma-separated list of Google Cloud authentication scopes.
--google_credentials =<a string> default: see description
Specifies the file to get authentication credentials from. See https://cloud.google.com/docs/authentication for details.
--[no]google_default_credentials default: "false"
Whether to use 'Google Application Default Credentials' for authentication. See https://cloud.google.com/docs/authentication for details. Disabled by default.
--grpc_keepalive_time =<An immutable length of time.> default: see description
Configures keep-alive pings for outgoing gRPC connections. If this is set, then Bazel sends pings after this much time of no read operations on the connection, but only if there is at least one pending gRPC call. Times are treated as second granularity; it is an error to set a value less than one second. By default, keep-alive pings are disabled. You should coordinate with the service owner before enabling this setting.
--grpc_keepalive_timeout =<An immutable length of time.> default: "20s"
Configures a keep-alive timeout for outgoing gRPC connections. If keep-alive pings are enabled with --grpc_keepalive_time, then Bazel times out a connection if it does not receive a ping reply after this much time. Times are treated as second granularity; it is an error to set a value less than one second. If keep-alive pings are disabled, then this setting is ignored.
--override_repository =<an equals-separated mapping of repository name to path> multiple uses are accumulated
Overrides a repository with a local directory.
--package_path =<colon-separated list of options> default: "%workspace%"
A colon-separated list of where to look for packages. Elements beginning with '%workspace%' are relative to the enclosing workspace. If omitted or empty, the default is the output of 'bazel info default-package-path'.
--[no]show_loading_progress default: "true"
If enabled, causes Bazel to print "Loading package:" messages.
--tls_certificate =<a string> default: see description
Specify a path to a TLS certificate that is trusted to sign server certificates.
--tls_client_certificate =<a string> default: see description
Specify the TLS client certificate to use; you also need to provide a client key to enable client authentication.
--tls_client_key =<a string> default: see description
Specify the TLS client key to use; you also need to provide a client certificate to enable client authentication.

Run Options

Inherits all options from build .

Options that appear before the command and are parsed by the client:
--check_direct_dependencies =<off, warning or error> default: "warning"
Check if the direct `bazel_dep` dependencies declared in the root module are the same versions you get in the resolved dependency graph. Valid values are `off` to disable the check, `warning` to print a warning when mismatch detected or `error` to escalate it to a resolution failure.
Tags: loading_and_analysis
--distdir =<a path> multiple uses are accumulated
Additional places to search for archives before accessing the network to download them.
Tags: bazel_internal_configuration
--[no]experimental_enable_bzlmod default: "false"
If true, Bazel tries to load external repositories from the Bzlmod system before looking into the WORKSPACE file.
Tags: loading_and_analysis
If set, the repository cache will hardlink the file in case of a cache hit, rather than copying. This is intended to save disk space.
Tags: bazel_internal_configuration
--[no]experimental_repository_cache_urls_as_default_canonical_id default: "false"
If true, use a string derived from the URLs of repository downloads as the canonical_id if not specified. This causes a change in the URLs to result in a redownload even if the cache contains a download with the same hash. This can be used to verify that URL changes don't result in broken repositories being masked by the cache.
Tags: loading_and_analysis ,