diff --git a/environment b/environment index 5d141d2f..66dfcacf 100644 --- a/environment +++ b/environment @@ -17,7 +17,10 @@ export PATH=$PATH:$HOME/.cargo/bin export RUST_TARGET_PATH="$(pwd)" -export RUST_COMPILER_RT_ROOT=$RUST_TARGET_PATH/rust/rust/src/llvm-project/compiler-rt +#export RUST_COMPILER_RT_ROOT=$RUST_TARGET_PATH/rust/rust/src/llvm-project/compiler-rt +# for cargo build-std, set the Rust src path +export __CARGO_TESTS_ONLY_SRC_ROOT="$(pwd)/rust/rust" + if [ -z "$OPTEE_DIR" ] then export OPTEE_DIR="$(pwd)/optee" diff --git a/examples/acipher-rs/ta/Makefile b/examples/acipher-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/acipher-rs/ta/Makefile +++ b/examples/acipher-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/acipher-rs/ta/Xargo.toml b/examples/acipher-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/acipher-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/aes-rs/ta/Makefile b/examples/aes-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/aes-rs/ta/Makefile +++ b/examples/aes-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/aes-rs/ta/Xargo.toml b/examples/aes-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/aes-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/authentication-rs/ta/Makefile b/examples/authentication-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/authentication-rs/ta/Makefile +++ b/examples/authentication-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/authentication-rs/ta/Xargo.toml b/examples/authentication-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/authentication-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/big_int-rs/ta/Makefile b/examples/big_int-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/big_int-rs/ta/Makefile +++ b/examples/big_int-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/big_int-rs/ta/Xargo.toml b/examples/big_int-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/big_int-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/diffie_hellman-rs/ta/Makefile b/examples/diffie_hellman-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/diffie_hellman-rs/ta/Makefile +++ b/examples/diffie_hellman-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/diffie_hellman-rs/ta/Xargo.toml b/examples/diffie_hellman-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/diffie_hellman-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/digest-rs/ta/Makefile b/examples/digest-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/digest-rs/ta/Makefile +++ b/examples/digest-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/digest-rs/ta/Xargo.toml b/examples/digest-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/digest-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/hello_world-rs/ta/Makefile b/examples/hello_world-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/hello_world-rs/ta/Makefile +++ b/examples/hello_world-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/hello_world-rs/ta/Xargo.toml b/examples/hello_world-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/hello_world-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/hotp-rs/ta/Makefile b/examples/hotp-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/hotp-rs/ta/Makefile +++ b/examples/hotp-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/hotp-rs/ta/Xargo.toml b/examples/hotp-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/hotp-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/message_passing_interface-rs/ta/Makefile b/examples/message_passing_interface-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/message_passing_interface-rs/ta/Makefile +++ b/examples/message_passing_interface-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/message_passing_interface-rs/ta/Xargo.toml b/examples/message_passing_interface-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/message_passing_interface-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/random-rs/ta/Makefile b/examples/random-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/random-rs/ta/Makefile +++ b/examples/random-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/random-rs/ta/Xargo.toml b/examples/random-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/random-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/secure_storage-rs/ta/Makefile b/examples/secure_storage-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/secure_storage-rs/ta/Makefile +++ b/examples/secure_storage-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/secure_storage-rs/ta/Xargo.toml b/examples/secure_storage-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/secure_storage-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/serde-rs/ta/Makefile b/examples/serde-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/serde-rs/ta/Makefile +++ b/examples/serde-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/serde-rs/ta/Xargo.toml b/examples/serde-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/serde-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/signature_verification-rs/ta/Makefile b/examples/signature_verification-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/signature_verification-rs/ta/Makefile +++ b/examples/signature_verification-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/signature_verification-rs/ta/Xargo.toml b/examples/signature_verification-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/signature_verification-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/supp_plugin-rs/ta/Makefile b/examples/supp_plugin-rs/ta/Makefile index 474b6314..00a535a0 100644 --- a/examples/supp_plugin-rs/ta/Makefile +++ b/examples/supp_plugin-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/supp_plugin-rs/ta/Xargo.toml b/examples/supp_plugin-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/supp_plugin-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/tcp_client-rs/ta/Makefile b/examples/tcp_client-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/tcp_client-rs/ta/Makefile +++ b/examples/tcp_client-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/tcp_client-rs/ta/Xargo.toml b/examples/tcp_client-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/tcp_client-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/time-rs/ta/Makefile b/examples/time-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/time-rs/ta/Makefile +++ b/examples/time-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/time-rs/ta/Xargo.toml b/examples/time-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/time-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/tls_client-rs/ta/Makefile b/examples/tls_client-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/tls_client-rs/ta/Makefile +++ b/examples/tls_client-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/tls_client-rs/ta/Xargo.toml b/examples/tls_client-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/tls_client-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/tls_server-rs/ta/Makefile b/examples/tls_server-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/tls_server-rs/ta/Makefile +++ b/examples/tls_server-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/tls_server-rs/ta/Xargo.toml b/examples/tls_server-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/tls_server-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/examples/udp_socket-rs/ta/Makefile b/examples/udp_socket-rs/ta/Makefile index 1c64ba30..5dc8b666 100644 --- a/examples/udp_socket-rs/ta/Makefile +++ b/examples/udp_socket-rs/ta/Makefile @@ -40,7 +40,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: - @xargo build --target $(TARGET) --release --verbose + @cargo build -Z build-std=std,panic_abort --target $(TARGET) --release strip: @$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta diff --git a/examples/udp_socket-rs/ta/Xargo.toml b/examples/udp_socket-rs/ta/Xargo.toml deleted file mode 100644 index 7c09142e..00000000 --- a/examples/udp_socket-rs/ta/Xargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[dependencies.std] -path = "../../../rust/rust/library/std" - -[patch.crates-io] -libc = { path = "../../../rust/libc" } -#compiler_builtins = { path = "../../../rust/compiler-builtins" } -rustc-std-workspace-core = { path = "../../../rust/rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../../../rust/rust/library/rustc-std-workspace-alloc" } diff --git a/setup.sh b/setup.sh index 375cbc19..46adfd01 100755 --- a/setup.sh +++ b/setup.sh @@ -40,7 +40,7 @@ fi cargo --version >/dev/null # install Xargo -cargo +stable install xargo +# cargo +stable install xargo ######################################################## # initialize submodules: optee_os / optee_client / build