diff --git a/packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart b/packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart index 611c4fb2406b..5ca39654a68e 100644 --- a/packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart +++ b/packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart @@ -175,8 +175,7 @@ class ShaderCompiler { ); } - final String shaderLibPath = _fs.path.join(_fs.path.dirname(impellerc.path), 'shader_lib'); - + final String shaderLibPath = _fs.path.join(impellerc.parent.absolute.path, 'shader_lib'); final List cmd = [ impellerc.path, target.target, @@ -190,6 +189,7 @@ class ShaderCompiler { '--include=${input.parent.path}', '--include=$shaderLibPath', ]; + _logger.printTrace('shaderc command: $cmd'); final Process impellercProcess = await _processManager.start(cmd); final int code = await impellercProcess.exitCode; if (code != 0) { diff --git a/packages/flutter_tools/test/general.shard/asset_bundle_test.dart b/packages/flutter_tools/test/general.shard/asset_bundle_test.dart index 8c90a1a43ebf..bd272f884ffc 100644 --- a/packages/flutter_tools/test/general.shard/asset_bundle_test.dart +++ b/packages/flutter_tools/test/general.shard/asset_bundle_test.dart @@ -17,7 +17,7 @@ import 'package:flutter_tools/src/globals.dart' as globals; import '../src/common.dart'; import '../src/context.dart'; -const String shaderLibDir = './shader_lib'; +const String shaderLibDir = '/./shader_lib'; void main() { group('AssetBundle.build', () { diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart index 04f48425c1a9..314242fa83fb 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart @@ -263,7 +263,7 @@ void main() { '--input=/shader.glsl', '--input-type=frag', '--include=/', - '--include=./shader_lib', + '--include=/./shader_lib', ]), FakeCommand(command: [ 'codesign', diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart index b6dc1df51609..481a5148507b 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart @@ -16,7 +16,7 @@ import '../../../src/common.dart'; import '../../../src/fake_process_manager.dart'; const String fragDir = '/shaders'; -const String shaderLibDir = './shader_lib'; +const String shaderLibDir = '/./shader_lib'; const String fragPath = '/shaders/my_shader.frag'; const String notFragPath = '/shaders/not_a_frag.file'; const String outputSpirvPath = '/output/shaders/my_shader.frag.spirv';