Skip to content

Commit a7cd218

Browse files
authored
Merge pull request #391 from coldav/colin/fix_cookie_atomic64
Cookie changes required to build offline including atomic64
2 parents 636d252 + fd21edb commit a7cd218

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

modules/mux/cookie/hooks/post_gen_project.py

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ def copy_file_replace_riscv(src_dir, src_file, dst_dir, dst_file=None):
3333
line = ("/// Copyright (C) Codeplay Software Limited. All Rights Reserved.\n")
3434
if "{{cookiecutter.copyright_name}}" != "":
3535
line += ("/// Additional changes Copyright (C) {{cookiecutter.copyright_name}}. All Rights\n/// Reserved.\n")
36+
# Replace 64 bit for device_info.cpp since we currently copy risc-v base file
37+
if "{{cookiecutter.capabilities_atomic64}}" == "false" and "device_info.cpp" in src_path:
38+
line = line.replace(" | mux_atomic_capabilities_64bit", "")
3639
fout.write(line)
3740
#close input and output files
3841
fin.close()

modules/mux/cookie/{{cookiecutter.target_name}}/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ target_link_libraries({{cookiecutter.target_name}}
130130
PUBLIC
131131
cargo
132132
tracer
133-
compiler-pipeline
134-
compiler-binary-metadata
135-
utils
133+
md_handler
136134
)
137135
target_link_libraries({{cookiecutter.target_name}} PUBLIC loader)
138136
if(NOT CA_HAL_{{cookiecutter.target_name_capitals}}_NAME STREQUAL "" AND TARGET "hal_${CA_HAL_{{cookiecutter.target_name_capitals}}_NAME}")
@@ -152,6 +150,9 @@ if({{cookiecutter.target_name_capitals}}_32_BITS)
152150
else()
153151
list(APPEND {{cookiecutter.target_name}}Capabilities "64bit")
154152
endif()
153+
{%- if cookiecutter.capabilities_atomic64 == "true" %}
154+
list(APPEND {{cookiecutter.target_name}}Capabilities "atomic64")
155+
{%- endif %}
155156

156157
if({{cookiecutter.target_name_capitals}}_FP64)
157158
list(APPEND {{cookiecutter.target_name}}Capabilities "fp64")

scripts/create_target.py

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"bit_width" : 32 or 64 bits.
5050
"capabilities_fp16" : true if has fp16 capability else false.
5151
"capabilities_fp64" : true if has fp64 capability else false.
52+
"capabilities_atomic64" : true if has atomic64 capability else false (true default).
5253
"feature" : A list of features (normally tutorials) to enable as a ';' separated string
5354
Tutorials can be part finished e.g. clmul_1 or just clmul
5455
Current list is "replace_mem", "refsi_wrapper_pass" and "clmul"

scripts/default_target_cookie.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"bit_width": "64",
1212
"capabilities_fp16": "false",
1313
"capabilities_fp64": "true",
14+
"capabilities_atomic64": "true",
1415
"feature" : "",
1516
"copyright_name" : ""
1617
}

0 commit comments

Comments
 (0)