about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorDavid Wood <david.wood@huawei.com>2022-10-17 14:11:26 +0100
committerDavid Wood <david.wood@huawei.com>2023-02-22 09:15:54 +0000
commit984945a1176fef84d45eb9ff0a59dbdfd010890f (patch)
treeea81537387b8ae2be1af042682afa30421c1f25b /src
parent3e14bba40c78dec57fc87ff07581b11daf530b0c (diff)
downloadrust-984945a1176fef84d45eb9ff0a59dbdfd010890f.tar.gz
rust-984945a1176fef84d45eb9ff0a59dbdfd010890f.zip
various: translation resources from cg backend
Extend `CodegenBackend` trait with a function returning the translation
resources from the codegen backend, which can be added to the complete
list of resources provided to the emitter.

Signed-off-by: David Wood <david.wood@huawei.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 546c892aae5..44538b41528 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -103,6 +103,10 @@ pub struct GccCodegenBackend {
 }
 
 impl CodegenBackend for GccCodegenBackend {
+    fn locale_resource(&self) -> &'static str {
+        crate::DEFAULT_LOCALE_RESOURCE
+    }
+
     fn init(&self, sess: &Session) {
         if sess.lto() != Lto::No {
             sess.emit_warning(LTONotSupported {});