aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-01-21 19:40:44 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-01-21 19:40:44 -0500
commit92559cd02cbf6497b99eb5193c9094e6d92c214e (patch)
tree13ff36b93f06555fd31803750debbd03d10f4b47 /src
parent15d5cab569a5ffc6495d606f460264429043aabf (diff)
downloadzig-92559cd02cbf6497b99eb5193c9094e6d92c214e.tar.gz
zig-92559cd02cbf6497b99eb5193c9094e6d92c214e.zip
hit a comptime limitation with computing dense sets
Diffstat (limited to 'src')
-rw-r--r--src/all_types.hpp1
-rw-r--r--src/codegen.cpp6
-rw-r--r--src/main.cpp5
3 files changed, 10 insertions, 2 deletions
diff --git a/src/all_types.hpp b/src/all_types.hpp
index df52c29a4e..fae7dae077 100644
--- a/src/all_types.hpp
+++ b/src/all_types.hpp
@@ -2144,6 +2144,7 @@ struct CodeGen {
bool verbose_llvm_ir;
bool verbose_cimport;
bool verbose_cc;
+ bool verbose_llvm_cpu_features;
bool error_during_imports;
bool generate_error_name_table;
bool enable_cache; // mutually exclusive with output_dir
diff --git a/src/codegen.cpp b/src/codegen.cpp
index ffdf0e5bb0..f7cfc95b3a 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -8802,8 +8802,10 @@ static void init(CodeGen *g) {
target_specific_cpu_args = stage2_cpu_features_get_llvm_cpu(g->zig_target->cpu_features);
target_specific_features = stage2_cpu_features_get_llvm_features(g->zig_target->cpu_features);
}
- //fprintf(stderr, "name=%s target_specific_cpu_args=%s\n", buf_ptr(g->root_out_name), target_specific_cpu_args);
- //fprintf(stderr, "name=%s target_specific_features=%s\n", buf_ptr(g->root_out_name), target_specific_features);
+ if (g->verbose_llvm_cpu_features) {
+ fprintf(stderr, "name=%s target_specific_cpu_args=%s\n", buf_ptr(g->root_out_name), target_specific_cpu_args);
+ fprintf(stderr, "name=%s target_specific_features=%s\n", buf_ptr(g->root_out_name), target_specific_features);
+ }
g->target_machine = ZigLLVMCreateTargetMachine(target_ref, buf_ptr(&g->llvm_triple_str),
target_specific_cpu_args, target_specific_features, opt_level, reloc_mode,
diff --git a/src/main.cpp b/src/main.cpp
index d12ae850fa..bc181f3d5d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -93,6 +93,7 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) {
" --verbose-llvm-ir enable compiler debug output for LLVM IR\n"
" --verbose-cimport enable compiler debug output for C imports\n"
" --verbose-cc enable compiler debug output for C compilation\n"
+ " --verbose-llvm-cpu-features enable compiler debug output for LLVM CPU features\n"
" -dirafter [dir] add directory to AFTER include search path\n"
" -isystem [dir] add directory to SYSTEM include search path\n"
" -I[dir] add directory to include search path\n"
@@ -398,6 +399,7 @@ int main(int argc, char **argv) {
bool verbose_llvm_ir = false;
bool verbose_cimport = false;
bool verbose_cc = false;
+ bool verbose_llvm_cpu_features = false;
bool link_eh_frame_hdr = false;
ErrColor color = ErrColorAuto;
CacheOpt enable_cache = CacheOptAuto;
@@ -614,6 +616,8 @@ int main(int argc, char **argv) {
verbose_cimport = true;
} else if (strcmp(arg, "--verbose-cc") == 0) {
verbose_cc = true;
+ } else if (strcmp(arg, "--verbose-llvm-cpu-features") == 0) {
+ verbose_llvm_cpu_features = true;
} else if (strcmp(arg, "-rdynamic") == 0) {
rdynamic = true;
} else if (strcmp(arg, "--each-lib-rpath") == 0) {
@@ -1184,6 +1188,7 @@ int main(int argc, char **argv) {
g->verbose_llvm_ir = verbose_llvm_ir;
g->verbose_cimport = verbose_cimport;
g->verbose_cc = verbose_cc;
+ g->verbose_llvm_cpu_features = verbose_llvm_cpu_features;
g->output_dir = output_dir;
g->disable_gen_h = disable_gen_h;
g->bundle_compiler_rt = bundle_compiler_rt;