From e965c61522e9263c18e33fe62c793d7c10a5097f Mon Sep 17 00:00:00 2001 From: bopeng-cruxml Date: Tue, 4 Apr 2023 13:03:37 +1000 Subject: [PATCH] change c++ version to c++11 for vivado_hls --- vitis/defs.bzl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vitis/defs.bzl b/vitis/defs.bzl index 4d5b749c..438a0557 100644 --- a/vitis/defs.bzl +++ b/vitis/defs.bzl @@ -34,7 +34,10 @@ vitis_hls_files_aspect = aspect( def _vitis_generate_impl(ctx): all_files = [] - cflags = "-D__SYNTHESIS__=1 --std=c++17" + if ctx.attr.use_vivado_hls: + cflags = "-D__SYNTHESIS__=1 --std=c++11" + else: + cflags = "-D__SYNTHESIS__=1 --std=c++17" for dep in ctx.attr.deps: for file in dep[HlsFileInfo].files: external_path = "/".join([file.root.path, file.owner.workspace_root]) if file.root.path else file.owner.workspace_root