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
committerAntoni Boucher <bouanto@zoho.com>2023-02-28 22:16:56 -0500
commit7696f981ea8a19d4e1e261bef6ade31d4d902f38 (patch)
treee4a53269a8c1ea6b65c7db026a8f6c4d40073859 /src
parent564ab10b9c6799063934ef7e6d82b8388f349047 (diff)
downloadrust-7696f981ea8a19d4e1e261bef6ade31d4d902f38.tar.gz
rust-7696f981ea8a19d4e1e261bef6ade31d4d902f38.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 c32c837d83a..1b7feb5f8a1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -105,6 +105,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 {});