https://github.com/ziglang/zig/commit/ca3c4ff2d0afcdc8fe86e7e7b41a967c88779729 From: Shupei Fan zig0: properly set llvm_cpu_names and llvm_cpu_features for riscv Bug: https://bugs.gentoo.org/851732 --- a/src/stage1/zig0.cpp +++ b/src/stage1/zig0.cpp @@ -160,6 +160,17 @@ static void get_native_target(ZigTarget *target) { } } +static const char* get_baseline_llvm_cpu_name(ZigLLVM_ArchType arch) { + return ""; +} + +static const char* get_baseline_llvm_cpu_features(ZigLLVM_ArchType arch) { + switch (arch) { + case ZigLLVM_riscv64: return "+a,+c,+d,+m"; + default: return ""; + } +} + static Error target_parse_triple(struct ZigTarget *target, const char *zig_triple, const char *mcpu, const char *dynamic_linker) { @@ -178,8 +189,8 @@ static Error target_parse_triple(struct ZigTarget *target, const char *zig_tripl } else if (strcmp(mcpu, "baseline") == 0) { target->is_native_os = false; target->is_native_cpu = false; - target->llvm_cpu_name = ""; - target->llvm_cpu_features = ""; + target->llvm_cpu_name = get_baseline_llvm_cpu_name(target->arch); + target->llvm_cpu_features = get_baseline_llvm_cpu_features(target->arch); } else { const char *msg = "stage0 can't handle CPU/features in the target"; stage2_panic(msg, strlen(msg)); @@ -220,6 +231,9 @@ static Error target_parse_triple(struct ZigTarget *target, const char *zig_tripl const char *msg = "stage0 can't handle CPU/features in the target"; stage2_panic(msg, strlen(msg)); } + + target->llvm_cpu_name = get_baseline_llvm_cpu_name(target->arch); + target->llvm_cpu_features = get_baseline_llvm_cpu_features(target->arch); } return ErrorNone; me='q' value=''/>
path: root/nix/libutil
AgeCommit message (Expand)Author
2021-11-19daemon: Micro-optimize 'deletePath'....'remove' calls 'unlink' first and falls back to 'rmdir' upon EISDIR. This change gets rid of the 'unlink' call for every directory being removed. * nix/libutil/util.cc (_deletePath): Call 'unlink' or 'rmdir' depending on 'st.st_mode', rather than call 'remove'. Ludovic Courtès
2020-12-08daemon: 'Agent' constructor takes a list of environment variables....* nix/libutil/util.hh (struct Agent)[Agent]: Add 'env' parameter. * nix/libutil/util.cc (Agent::Agent): Honor it. Ludovic Courtès
2020-09-14daemon: Move 'Agent' to libutil....* nix/libstore/build.cc (DerivationGoal::tryBuildHook): Add "offload" to 'args' and pass settings.guixProgram as the first argument to Agent::Agent. (pathNullDevice, commonChildInit, Agent, Agent::Agent) (Agent::~Agent): Move to... * nix/libutil/util.cc: ... here. * nix/libutil/util.hh (struct Agent, commonChildInit): New declarations. Ludovic Courtès
2020-06-27daemon: Recognize SHA3 and BLAKE2s....* nix/libutil/hash.hh (HashType): Add htSHA3_256, htSHA3_512, and htBLAKE2s_256. * nix/libutil/hash.cc (parseHashType, printHashType): Recognize them. * tests/store.scm ("add-to-store"): Test these algorithms. Ludovic Courtès
2020-06-27daemon: Remove OpenSSL hash compatibility wrappers....* nix/libutil/hash.cc (struct Ctx): Copy from gcrypt-hash.hh. (start, update, finish): Use gcrypt functions directly instead of OpenSSL-like wrappers. * nix/libutil/gcrypt-hash.cc, nix/libutil/gcrypt-hash.hh, nix/libutil/md5.h, nix/libutil/sha1.h, nix/libutil/sha256.h, nix/libutil/sha512.h: Remove. * nix/local.mk (libutil_a_SOURCES, libutil_headers): Adjust accordingly. Ludovic Courtès
2020-06-27daemon: Map directly to gcrypt hash functions....* nix/libutil/hash.hh (HashType): Map directly to GCRY_MD_ values. (md5HashSize, sha1HashSize, sha256HashSize, sha512HashSize): Remove. * nix/libutil/hash.cc (Hash::Hash): Use 'gcry_md_get_algo_dlen'. Ludovic Courtès
2020-06-24nix: Tweak .gitignore files....Remove .gitignore entries where they match source files that are tracked in Git. This is relevant to me at least, as some code searching tools use .gitignore files and will ignore matched files. Christopher Baines