Skip to content

Commit

Permalink
Fix multiplatform amd image (#85)
Browse files Browse the repository at this point in the history
* Add multi images and update Rust version to 1.74

* fixed links to files

* Downgrade markdown link check version to fix regression causing failure

* Add container specific config.toml to fix library error while leaving local build untouched

* Add multi images and update Rust version to 1.74

* fixed links to files

* Add container specific config.toml to fix library error while leaving local build untouched
  • Loading branch information
devkelley authored Mar 14, 2024
1 parent c9213ce commit 91d5f63
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile.multi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ WORKDIR /sdv

COPY ./ .

COPY ./container/cargo/config.toml ./.cargo/config.toml

# Check that APP_NAME argument is valid.
RUN /sdv/container/scripts/argument_sanitizer.sh \
--arg-value "${APP_NAME}" \
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile_integrated.multi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ WORKDIR /sdv

COPY ./ .

COPY ./container/cargo/config.toml ./.cargo/config.toml

# Check that APP_NAME argument is valid.
RUN /sdv/container/scripts/argument_sanitizer.sh \
--arg-value "${APP_NAME}" \
Expand Down
15 changes: 15 additions & 0 deletions container/cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# SPDX-License-Identifier: MIT

[env]
AGEMO_HOME = { value = ".agemo", relative = true }
AGEMO_SAMPLES_HOME = { value = ".agemo-samples", relative = true }

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ]

[target.x86_64-unknown-linux-gnu]
linker = "x86_64-linux-gnu-gcc"
rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ]
2 changes: 1 addition & 1 deletion pub-sub-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ url = { workspace = true }
uuid = { workspace = true, features = [ "v4", "fast-rng", "macro-diagnostics"] }
yaml-rust = { workspace = true }

[target.'cfg(target_arch = "aarch64")'.dependencies]
[target.'cfg(any(target_arch = "aarch64", target_arch = "x86_64"))'.dependencies]
paho-mqtt = { workspace = true, features = ["vendored-ssl"] }

0 comments on commit 91d5f63

Please sign in to comment.